Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b76e617

Browse files
Allow default values in stubs. (#9490)
Co-authored-by: Alex Waygood <[email protected]>
1 parent 5f08529 commit b76e617

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.flake8

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@
2323
# Currently can't be enabled due to a few lingering bugs in mypy regarding
2424
# PEP 604 type aliases (see #4819).
2525

26+
# Outdated rules in flake8-pyi that should possibly be deprecated altogether:
27+
# Y011 All default values for typed function arguments must be `...`
28+
# Y015 Attribute must not have a default value other than `...`
29+
2630
[flake8]
2731
per-file-ignores =
2832
*.py: E203, E301, E302, E305, E501
29-
*.pyi: B, E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y037
33+
*.pyi: B, E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y011, Y015, Y037
3034
# Since typing.pyi defines "overload" this is not recognized by flake8 as typing.overload.
3135
# Unfortunately, flake8 does not allow to "noqa" just a specific error inside the file itself.
3236
# https://github.com/PyCQA/flake8/issues/1079
3337
# F811 redefinition of unused '...'
34-
stdlib/typing.pyi: B, E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y037
38+
stdlib/typing.pyi: B, E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y011, Y015, Y037
3539
# Generated protobuf files include docstrings
3640
*_pb2.pyi: B, E301, E302, E305, E501, E701, Y021, Y026
3741

0 commit comments

Comments
 (0)