Skip to content

Remove useless supressions #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .config/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras .config/requirements.in pyproject.toml
#
ansible-builder==3.0.1
astroid==3.2.2
attrs==23.2.0
babel==2.15.0
beautifulsoup4==4.12.3
Expand All @@ -21,10 +22,11 @@ chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
coverage==7.5.2
coverage==7.5.3
csscompressor==0.9.5
cssselect2==0.7.0
defusedxml==0.7.1
dill==0.3.8
distlib==0.3.8
distro==1.9.0
dnspython==2.6.1
Expand All @@ -39,6 +41,7 @@ htmlmin2==0.1.13
identify==2.5.36
idna==3.7
iniconfig==2.0.0
isort==5.13.2
jinja2==3.1.4
jsmin==3.0.1
jsonschema==4.22.0
Expand Down Expand Up @@ -82,6 +85,7 @@ pycparser==2.22
pydoclint==0.4.1
pyflakes==3.2.0
pygments==2.18.0
pylint==3.2.2
pymdown-extensions==10.8.1
pyproject-api==1.6.1
pyproject-hooks==1.1.0
Expand Down
1 change: 1 addition & 0 deletions .config/requirements-test.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ mypy
pip-tools
pre-commit
pydoclint[flake8]
pylint
pytest
pytest-xdist
ruff
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"],
"mypy-type-checker.importStrategy": "fromEnvironment",
"mypy-type-checker.reportingScope": "workspace",
"pylint.importStrategy": "fromEnvironment",
"python.testing.pytestArgs": ["tests"],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,10 @@ disable = [
"too-many-instance-attributes"
]
enable = [
"useless-suppression" # Identify unneeded pylint disable statements
"useless-suppression"
]
fail-on = [
"useless-suppression"
]

[tool.pytest.ini_options]
Expand Down
1 change: 0 additions & 1 deletion src/ansible_dev_environment/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ def parse() -> argparse.Namespace:
help="Uninstall a collection.",
)

# pylint: disable=protected-access
for grp in parser._action_groups: # noqa: SLF001
if grp.title is None:
continue
Expand Down
1 change: 0 additions & 1 deletion src/ansible_dev_environment/subcommands/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def __init__(self: Inspector, config: Config, output: Output) -> None:

def run(self: Inspector) -> None:
"""Run the Inspector."""
# pylint: disable=too-many-locals
collections = collect_manifests(
target=self._config.site_pkg_collections_path,
venv_cache_dir=self._config.venv_cache_dir,
Expand Down
1 change: 0 additions & 1 deletion src/ansible_dev_environment/subcommands/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ def _install_local_collection(
Raises:
RuntimeError: If tarball is not found or if more than one tarball is found.
"""
# pylint: disable=too-many-instance-attributes
msg = f"Installing local collection from: {collection.build_dir}"
self._output.info(msg)

Expand Down
1 change: 0 additions & 1 deletion src/ansible_dev_environment/subcommands/lister.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def run(self: Lister) -> None:
Raises:
TypeError: If the link is not a string.
"""
# pylint: disable=too-many-locals
collections = collect_manifests(
target=self._config.site_pkg_collections_path,
venv_cache_dir=self._config.venv_cache_dir,
Expand Down
1 change: 0 additions & 1 deletion src/ansible_dev_environment/subcommands/treemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def run(self: TreeMaker) -> None: # noqa: C901, PLR0912, PLR0915
Raises:
TypeError: If the tree dict is not a dict.
"""
# pylint: disable=too-many-locals
builder_introspect(self._config, self._output)

with self._config.discovered_python_reqs.open("r") as reqs_file:
Expand Down
1 change: 0 additions & 1 deletion src/ansible_dev_environment/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def _print_tree( # noqa: C901, PLR0913, PLR0912
Raises:
TypeError: If the object is not a dict, list, or scalar
"""
# pylint: disable=R0914
if isinstance(obj, dict):
for i, (key, value) in enumerate(obj.items()):
is_last = i == len(obj) - 1
Expand Down
1 change: 0 additions & 1 deletion src/ansible_dev_environment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ def collect_manifests( # noqa: C901
target: Path,
venv_cache_dir: Path,
) -> dict[str, dict[str, JSONVal]]:
# pylint: disable=too-many-locals
"""Collect manifests from a target directory.

Args:
Expand Down
Loading