Skip to content

Commit

Permalink
chore: Enable INP Ruff checks (#1501)
Browse files Browse the repository at this point in the history
<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/
  • Loading branch information
edgarrmondragon authored Mar 16, 2023
1 parent 86e3b37 commit ee2552a
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,19 @@ select = [
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"PT", # flake8-pytest-style
]
src = ["samples", "singer_sdk", "tests"]
target-version = "py37"

[tool.ruff.per-file-ignores]
"docs/conf.py" = ["D", "I002"]
"docs/conf.py" = [
"D", # pydocstyle/flake8-docstrings
"I002", # isort: missing-required-import
"INP001", # flake8-no-pep420: implicit-namespace-package
]
"noxfile.py" = ["ANN"]
"tests/*" = ["ANN", "D1", "D2"]
# Disabled some checks in samples code
Expand Down
Empty file added samples/aapl/__init__.py
Empty file.
Empty file added tests/_singerlib/__init__.py
Empty file.
Empty file added tests/cookiecutters/__init__.py
Empty file.
Empty file.
Empty file added tests/core/rest/__init__.py
Empty file.
Empty file added tests/samples/__init__.py
Empty file.

0 comments on commit ee2552a

Please sign in to comment.