Skip to content

Commit ee2552a

Browse files
chore: Enable INP Ruff checks (#1501)
<h2>Rationale</h2> <p>Implicit namespace packages are directories of Python files without an <code>__init__.py</code>. They’re valid and importable, but they break <em>many</em> tools, such as:</p> <ul> <li><p><a href="https://bugs.python.org/issue23882" rel="nofollow">unittest test discovery</a> (and by extension, Django’s test runner)</p></li> <li><p><a href="nedbat/coveragepy#1024" rel="nofollow">Coverage.py</a></p></li> <li><p>Mypy without its <a href="https://mypy.readthedocs.io/en/latest/command_line.html#import-discovery" rel="nofollow">–namespace-packages option</a></p></li> <li><p><a href="pytest-dev/pytest#5147" rel="nofollow">pytest</a></p></li> </ul> https://pypi.org/project/flake8-no-pep420/
1 parent 86e3b37 commit ee2552a

File tree

7 files changed

+6
-1
lines changed

7 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,19 @@ select = [
232232
"T10", # flake8-debugger
233233
"ISC", # flake8-implicit-str-concat
234234
"ICN", # flake8-import-conventions
235+
"INP", # flake8-no-pep420
235236
"PIE", # flake8-pie
236237
"PT", # flake8-pytest-style
237238
]
238239
src = ["samples", "singer_sdk", "tests"]
239240
target-version = "py37"
240241

241242
[tool.ruff.per-file-ignores]
242-
"docs/conf.py" = ["D", "I002"]
243+
"docs/conf.py" = [
244+
"D", # pydocstyle/flake8-docstrings
245+
"I002", # isort: missing-required-import
246+
"INP001", # flake8-no-pep420: implicit-namespace-package
247+
]
243248
"noxfile.py" = ["ANN"]
244249
"tests/*" = ["ANN", "D1", "D2"]
245250
# Disabled some checks in samples code

samples/aapl/__init__.py

Whitespace-only changes.

tests/_singerlib/__init__.py

Whitespace-only changes.

tests/cookiecutters/__init__.py

Whitespace-only changes.

tests/core/configuration/__init__.py

Whitespace-only changes.

tests/core/rest/__init__.py

Whitespace-only changes.

tests/samples/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)