diff --git a/pyproject.toml b/pyproject.toml index 811c581a9..99682d807 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -233,6 +233,9 @@ disable = [ enable = [ "useless-suppression" # Identify unneeded pylint disable statements ] +fail-on = [ + "useless-suppression" +] [tool.pytest.ini_options] # do not add xdist options here as this will make running of a single test and @@ -281,8 +284,6 @@ ignore = [ 'FBT001', # Boolean positional arg in function definition 'FBT002', # Boolean default value in function definition 'FBT003', # Boolean positional value in function call - 'FIX001', # Line contains FIXME - 'FIX002', # Line contains TODO 'N802', # Function name `formatTime` should be lowercase 'N806', # Variable `FType` in function should be lowercase 'N812', # Lowercase `__version_collection_doc_cache__` imported as non-lowercase `VERSION_CDC` diff --git a/src/ansible_navigator/data/catalog_collections.py b/src/ansible_navigator/data/catalog_collections.py index 18cfcc7f2..b91daa19e 100644 --- a/src/ansible_navigator/data/catalog_collections.py +++ b/src/ansible_navigator/data/catalog_collections.py @@ -449,7 +449,6 @@ def identify_missing( def parse_args() -> tuple[argparse.Namespace, list[Path]]: - # pylint: disable=used-before-assignment # pylint: disable=possibly-used-before-assignment """Parse the arguments from the command line. @@ -596,7 +595,6 @@ def run_command(cmd: list[str]) -> dict[str, str]: def main() -> dict[Any, Any]: # pylint: disable=protected-access - # pylint: disable=used-before-assignment # pylint: disable=possibly-used-before-assignment """Run the collection catalog process. diff --git a/src/ansible_navigator/tm_tokenize/rules.py b/src/ansible_navigator/tm_tokenize/rules.py index f49af9198..d95d3ef92 100644 --- a/src/ansible_navigator/tm_tokenize/rules.py +++ b/src/ansible_navigator/tm_tokenize/rules.py @@ -415,7 +415,7 @@ def _captures( rule = compiler.compile_rule(u_rule) start, end = match.span(i) if start < pos: - # TODO: could maybe bisect but this is probably fast enough + # could maybe bisect but this is probably fast enough j = len(ret) - 1 while j > 0 and start < ret[j - 1].end: j -= 1 diff --git a/src/ansible_navigator/tm_tokenize/tokenize.py b/src/ansible_navigator/tm_tokenize/tokenize.py index 5c9a8c3de..df80daa89 100644 --- a/src/ansible_navigator/tm_tokenize/tokenize.py +++ b/src/ansible_navigator/tm_tokenize/tokenize.py @@ -22,7 +22,7 @@ def tokenize( pos = 0 boundary = state.cur.boundary - # TODO: this is still a little wasteful + # this is still a little wasteful while_stack = [] for while_rule, idx in state.while_stack: while_stack.append((while_rule, idx)) diff --git a/src/ansible_navigator/utils/functions.py b/src/ansible_navigator/utils/functions.py index 26cc5d19f..16c1e6385 100644 --- a/src/ansible_navigator/utils/functions.py +++ b/src/ansible_navigator/utils/functions.py @@ -133,7 +133,7 @@ def console_width() -> int: return 132 -# TODO: Replace this with something type-safe. +# Replace this with something type-safe. def dispatch(obj: object, replacements: tuple[tuple[str, str], ...]) -> object: """Make the replacement based on type. @@ -432,8 +432,8 @@ def str2bool(value: Any) -> bool: raise ValueError -# TODO: We are kind-of screwed type-wise by the fact that ast.literal_eval() -# returns Any. Need to find a better solution... "Any" isn't it. +# We are kind-of screwed type-wise by the fact that ast.literal_eval() +# returns Any. Need to find a better solution... "Any" isn't it. def templar(string: str, template_vars: Mapping[Any, Any]) -> tuple[list[str], Any]: """Template some string with jinja2 always to and from json. diff --git a/tests/unit/configuration_subsystem/test_configurator.py b/tests/unit/configuration_subsystem/test_configurator.py index 8fa21bd36..805959f46 100644 --- a/tests/unit/configuration_subsystem/test_configurator.py +++ b/tests/unit/configuration_subsystem/test_configurator.py @@ -3,7 +3,7 @@ import os -# pylint: disable=preferred-module # FIXME: remove once migrated per GH-872 +# pylint: disable=preferred-module from collections.abc import Callable from copy import deepcopy from typing import Any diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index d42bf96bf..60df89206 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -8,7 +8,7 @@ from typing import Literal from typing import NamedTuple -# pylint: disable=preferred-module # FIXME: remove once migrated per GH-872 +# pylint: disable=preferred-module from unittest.mock import patch import pytest