Skip to content

Commit

Permalink
Ignore A005
Browse files Browse the repository at this point in the history
Co-authored-by: A5rocks <git@helvetica.moe>
  • Loading branch information
CoolCat467 and A5rocks committed Sep 24, 2024
1 parent a38f7f6 commit fe334dc
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 16 deletions.
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,20 @@ extend-ignore = [
# to export for public use.
'src/trio/__init__.py' = ['F401']
'src/trio/_core/__init__.py' = ['F401']
'src/trio/abc.py' = ['F401']
'src/trio/abc.py' = ['F401', 'A005']
'src/trio/lowlevel.py' = ['F401']
'src/trio/socket.py' = ['F401']
'src/trio/socket.py' = ['F401', 'A005']
'src/trio/testing/__init__.py' = ['F401']
# RUF029 is ignoring tests that are marked as async functions but
# do not use an await in their function bodies. There are several
# places where internal trio synchronous code relies on being
# called from an async function, where current task is set up.
'src/trio/_tests/*.py' = ['RUF029']
'src/trio/_core/_tests/*.py' = ['RUF029']
# A005 is ignoring modules that shadow stdlib modules.
'src/trio/_abc.py' = ['A005']
'src/trio/_socket.py' = ['A005']
'src/trio/_ssl.py' = ['A005']

[tool.ruff.lint.isort]
combine-as-imports = true
Expand Down
3 changes: 0 additions & 3 deletions src/trio/_abc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# ruff: noqa: A005
# Module `_abc` is shadowing a Python builtin module

from __future__ import annotations

import socket
Expand Down
3 changes: 0 additions & 3 deletions src/trio/_socket.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# ruff: noqa: A005
# Module `_socket` is shadowing a Python builtin module

# ruff: noqa: PYI063 # Several cases throughout file where
# argument names with __ used because of typeshed, see comment for recv in _SocketType

Expand Down
3 changes: 0 additions & 3 deletions src/trio/_ssl.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# ruff: noqa: A005
# Module `_ssl` is shadowing a Python builtin module

from __future__ import annotations

import contextlib
Expand Down
2 changes: 0 additions & 2 deletions src/trio/abc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# ruff: noqa: A005
# Module `abc` is shadowing a Python builtin module
# This is a public namespace, so we don't want to expose any non-underscored
# attributes that aren't actually part of our public API. But it's very
# annoying to carefully always use underscored names for module-level
Expand Down
3 changes: 0 additions & 3 deletions src/trio/socket.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# ruff: noqa: A005
# Module `socket` is shadowing a Python builtin module

from __future__ import annotations

# This is a public namespace, so we don't want to expose any non-underscored
Expand Down

0 comments on commit fe334dc

Please sign in to comment.