Skip to content

Commit 44f68b8

Browse files
committed
Remove useless supressions (ansible#181)
1 parent f0f4831 commit 44f68b8

File tree

10 files changed

+11
-8
lines changed

10 files changed

+11
-8
lines changed

.config/constraints.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras .config/requirements.in pyproject.toml
66
#
77
ansible-builder==3.0.1
8+
astroid==3.2.2
89
attrs==23.2.0
910
babel==2.15.0
1011
beautifulsoup4==4.12.3
@@ -21,10 +22,11 @@ chardet==5.2.0
2122
charset-normalizer==3.3.2
2223
click==8.1.7
2324
colorama==0.4.6
24-
coverage==7.5.2
25+
coverage==7.5.3
2526
csscompressor==0.9.5
2627
cssselect2==0.7.0
2728
defusedxml==0.7.1
29+
dill==0.3.8
2830
distlib==0.3.8
2931
distro==1.9.0
3032
dnspython==2.6.1
@@ -39,6 +41,7 @@ htmlmin2==0.1.13
3941
identify==2.5.36
4042
idna==3.7
4143
iniconfig==2.0.0
44+
isort==5.13.2
4245
jinja2==3.1.4
4346
jsmin==3.0.1
4447
jsonschema==4.22.0
@@ -82,6 +85,7 @@ pycparser==2.22
8285
pydoclint==0.4.1
8386
pyflakes==3.2.0
8487
pygments==2.18.0
88+
pylint==3.2.2
8589
pymdown-extensions==10.8.1
8690
pyproject-api==1.6.1
8791
pyproject-hooks==1.1.0

.config/requirements-test.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ mypy
55
pip-tools
66
pre-commit
77
pydoclint[flake8]
8+
pylint
89
pytest
910
pytest-xdist
1011
ruff

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"],
1616
"mypy-type-checker.importStrategy": "fromEnvironment",
1717
"mypy-type-checker.reportingScope": "workspace",
18+
"pylint.importStrategy": "fromEnvironment",
1819
"python.testing.pytestArgs": ["tests"],
1920
"python.testing.pytestEnabled": true,
2021
"python.testing.unittestEnabled": false

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,10 @@ disable = [
295295
"too-many-instance-attributes"
296296
]
297297
enable = [
298-
"useless-suppression" # Identify unneeded pylint disable statements
298+
"useless-suppression"
299+
]
300+
fail-on = [
301+
"useless-suppression"
299302
]
300303

301304
[tool.pytest.ini_options]

src/ansible_dev_environment/subcommands/inspector.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def __init__(self: Inspector, config: Config, output: Output) -> None:
3636

3737
def run(self: Inspector) -> None:
3838
"""Run the Inspector."""
39-
# pylint: disable=too-many-locals
4039
collections = collect_manifests(
4140
target=self._config.site_pkg_collections_path,
4241
venv_cache_dir=self._config.venv_cache_dir,

src/ansible_dev_environment/subcommands/installer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ def _install_local_collection(
382382
Raises:
383383
RuntimeError: If tarball is not found or if more than one tarball is found.
384384
"""
385-
# pylint: disable=too-many-instance-attributes
386385
msg = f"Installing local collection from: {collection.build_dir}"
387386
self._output.info(msg)
388387

src/ansible_dev_environment/subcommands/lister.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def run(self: Lister) -> None:
3131
Raises:
3232
TypeError: If the link is not a string.
3333
"""
34-
# pylint: disable=too-many-locals
3534
collections = collect_manifests(
3635
target=self._config.site_pkg_collections_path,
3736
venv_cache_dir=self._config.venv_cache_dir,

src/ansible_dev_environment/subcommands/treemaker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def run(self: TreeMaker) -> None: # noqa: C901, PLR0912, PLR0915
3535
Raises:
3636
TypeError: If the tree dict is not a dict.
3737
"""
38-
# pylint: disable=too-many-locals
3938
builder_introspect(self._config, self._output)
4039

4140
with self._config.discovered_python_reqs.open("r") as reqs_file:

src/ansible_dev_environment/tree.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ def _print_tree( # noqa: C901, PLR0913, PLR0912
119119
Raises:
120120
TypeError: If the object is not a dict, list, or scalar
121121
"""
122-
# pylint: disable=R0914
123122
if isinstance(obj, dict):
124123
for i, (key, value) in enumerate(obj.items()):
125124
is_last = i == len(obj) - 1

src/ansible_dev_environment/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ def collect_manifests( # noqa: C901
200200
target: Path,
201201
venv_cache_dir: Path,
202202
) -> dict[str, dict[str, JSONVal]]:
203-
# pylint: disable=too-many-locals
204203
"""Collect manifests from a target directory.
205204
206205
Args:

0 commit comments

Comments
 (0)