Skip to content

Commit

Permalink
Ignore "Name shadows builtin" errors because astor gets rid of noqa c…
Browse files Browse the repository at this point in the history
…omments
  • Loading branch information
CoolCat467 committed Jan 22, 2024
1 parent bd999f7 commit 0bc0a8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ extend-exclude = [
'src/trio/lowlevel.py' = ['F401']
'src/trio/socket.py' = ['F401']
'src/trio/testing/__init__.py' = ['F401']
'src/trio/_core/_generated_io_kqueue.py' = ['A002']

[tool.ruff.isort]
combine-as-imports = true
Expand Down
7 changes: 2 additions & 5 deletions src/trio/_core/_generated_io_kqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def current_kqueue() -> select.kqueue:


def monitor_kevent(
ident: int,
filter: int, # noqa: A002 # Name shadows builtin
ident: int, filter: int
) -> ContextManager[_core.UnboundedQueue[select.kevent]]:
"""TODO: these are implemented, but are currently more of a sketch than
anything real. See `#26
Expand All @@ -57,9 +56,7 @@ def monitor_kevent(


async def wait_kevent(
ident: int,
filter: int, # noqa: A002 # Name shadows builtin
abort_func: Callable[[RaiseCancelT], Abort],
ident: int, filter: int, abort_func: Callable[[RaiseCancelT], Abort]
) -> Abort:
"""TODO: these are implemented, but are currently more of a sketch than
anything real. See `#26
Expand Down
1 change: 1 addition & 0 deletions src/trio/_tools/gen_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def run_ruff(file: File, source: str) -> tuple[bool, str]:
"check",
"--fix",
"--unsafe-fixes",
"--ignore=A002",
"--output-format=text",
"--stdin-filename",
file.path,
Expand Down

0 comments on commit 0bc0a8b

Please sign in to comment.