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

Skip to content

Commit c45999d

Browse files
authored
Re-enable NQA102 (#9426)
re-enable NQA102
1 parent 4a7e14e commit c45999d

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

.flake8

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,18 @@
2222
# Y037 Use PEP 604 syntax instead of `typing.Union` and `typing.Optional`.
2323
# Currently can't be enabled due to a few lingering bugs in mypy regarding
2424
# PEP 604 type aliases (see #4819).
25-
# NQA102 "noqa" code has no matching violations. We often introduce "noqa" comments
26-
# into the typeshed codebase to unblock flake8-pyi PRs, meaning these comments
27-
# have "no matching violations" since the relevant flake8-pyi checks haven't
28-
# yet been released.
2925

3026
[flake8]
3127
per-file-ignores =
3228
*.py: E203, E301, E302, E305, E501
33-
*.pyi: B, E301, E302, E305, E501, E701, E741, NQA102, F401, F403, F405, F822, Y037
29+
*.pyi: B, E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y037
3430
# Since typing.pyi defines "overload" this is not recognized by flake8 as typing.overload.
3531
# Unfortunately, flake8 does not allow to "noqa" just a specific error inside the file itself.
3632
# https://github.com/PyCQA/flake8/issues/1079
3733
# F811 redefinition of unused '...'
38-
stdlib/typing.pyi: B, E301, E302, E305, E501, E701, E741, NQA102, F401, F403, F405, F811, F822, Y037
34+
stdlib/typing.pyi: B, E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y037
3935
# Generated protobuf files include docstrings
40-
*_pb2.pyi: B, E301, E302, E305, E501, E701, NQA102, Y021, Y026
36+
*_pb2.pyi: B, E301, E302, E305, E501, E701, Y021, Y026
4137

4238
exclude = .venv*,.git
4339
noqa_require_code = true

stubs/python-xlib/Xlib/protocol/display.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ class Display:
9999
def check_for_error(self) -> None: ...
100100
def send_request(self, request: rq.Request | rq.ReplyRequest | ConnectionSetupRequest, wait_for_response: bool) -> None: ...
101101
def close_internal(self, whom: object) -> None: ...
102-
def send_and_recv(
103-
self, flush: bool = ..., event: bool = ..., request: int | None = ..., recv: bool = ... # noqa: F811
104-
) -> None: ...
102+
def send_and_recv(self, flush: bool = ..., event: bool = ..., request: int | None = ..., recv: bool = ...) -> None: ...
105103
def parse_response(self, request: int) -> bool: ...
106104
def parse_error_response(self, request: int) -> bool: ...
107105
def default_error_handler(self, err: object) -> None: ...

0 commit comments

Comments
 (0)