From b8691f341514e6f17c5854490b776ed608615108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Rami=CC=81rez=20Mondrago=CC=81n?= Date: Wed, 15 Mar 2023 15:01:42 -0600 Subject: [PATCH] chore: Enable `INP` Ruff checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit

Rationale

Implicit namespace packages are directories of Python files without an __init__.py. They’re valid and importable, but they break many tools, such as:

https://pypi.org/project/flake8-no-pep420/ --- pyproject.toml | 7 ++++++- samples/aapl/__init__.py | 0 tests/_singerlib/__init__.py | 0 tests/cookiecutters/__init__.py | 0 tests/core/configuration/__init__.py | 0 tests/core/rest/__init__.py | 0 tests/samples/__init__.py | 0 7 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 samples/aapl/__init__.py create mode 100644 tests/_singerlib/__init__.py create mode 100644 tests/cookiecutters/__init__.py create mode 100644 tests/core/configuration/__init__.py create mode 100644 tests/core/rest/__init__.py create mode 100644 tests/samples/__init__.py diff --git a/pyproject.toml b/pyproject.toml index 6ec4b6173..828a814a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -232,6 +232,7 @@ select = [ "T10", # flake8-debugger "ISC", # flake8-implicit-str-concat "ICN", # flake8-import-conventions + "INP", # flake8-no-pep420 "PIE", # flake8-pie "PT", # flake8-pytest-style ] @@ -239,7 +240,11 @@ 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 diff --git a/samples/aapl/__init__.py b/samples/aapl/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/_singerlib/__init__.py b/tests/_singerlib/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/cookiecutters/__init__.py b/tests/cookiecutters/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/core/configuration/__init__.py b/tests/core/configuration/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/core/rest/__init__.py b/tests/core/rest/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/samples/__init__.py b/tests/samples/__init__.py new file mode 100644 index 000000000..e69de29bb