Skip to content
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

Remove ISC from ruff ignores #3342

Merged
merged 2 commits into from Apr 25, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Expand Up @@ -236,7 +236,6 @@ ignore = [
"EXE",
"FBT",
"INP",
"ISC",
"PGH",
"PTH",
"PLR",
Expand Down
8 changes: 2 additions & 6 deletions src/ansiblelint/cli.py
Expand Up @@ -17,11 +17,7 @@
Options,
log_entries,
)
from ansiblelint.constants import (
CUSTOM_RULESDIR_ENVVAR,
DEFAULT_RULESDIR,
RC,
)
from ansiblelint.constants import CUSTOM_RULESDIR_ENVVAR, DEFAULT_RULESDIR, RC
from ansiblelint.file_utils import (
Lintable,
abspath,
Expand Down Expand Up @@ -428,7 +424,7 @@ def get_cli_parser() -> argparse.ArgumentParser:
action=AbspathArgAction,
type=Path,
default=[],
help="path to directories or files to skip. " "This option is repeatable.",
help="path to directories or files to skip. This option is repeatable.",
)
parser.add_argument(
"-c",
Expand Down
5 changes: 1 addition & 4 deletions src/ansiblelint/rules/deprecated_bare_vars.py
Expand Up @@ -92,10 +92,7 @@ def _matchvar(
has_jinja(varstring) or varstring.endswith(os.sep),
)
if not valid:
message = (
"Possible bare variable '{0}' used in a '{1}' loop."
+ " You should use the full variable syntax ('{{{{ {0} }}}}') or convert it to a list if that is not really a variable."
)
message = "Possible bare variable '{0}' used in a '{1}' loop. You should use the full variable syntax ('{{{{ {0} }}}}') or convert it to a list if that is not really a variable."
return message.format(task[loop_type], loop_type)
return False

Expand Down
2 changes: 1 addition & 1 deletion test/rules/fixtures/ematcher.py
Expand Up @@ -7,7 +7,7 @@ class EMatcherRule(AnsibleLintRule):

id = "TEST0001"
description = (
"This is a test custom rule that looks for lines " + "containing BANNED string"
"This is a test custom rule that looks for lines containing BANNED string"
)
tags = ["fake", "dummy", "test1"]

Expand Down
3 changes: 1 addition & 2 deletions test/rules/fixtures/unset_variable_matcher.py
Expand Up @@ -7,8 +7,7 @@ class UnsetVariableMatcherRule(AnsibleLintRule):

id = "TEST0002"
description = (
"This is a test rule that looks for lines "
+ "post templating that still contain {{"
"This is a test rule that looks for lines post templating that still contain {{"
)
tags = ["fake", "dummy", "test2"]

Expand Down
2 changes: 1 addition & 1 deletion test/test_main.py
Expand Up @@ -63,7 +63,7 @@ def test_get_version_warning(
outlen: int,
) -> None:
"""Assert get_version_warning working as expected."""
data = '{"html_url": "https://127.0.0.1", "tag_name": "' + f"{ver_diff}" + '"}'
data = f'{{"html_url": "https://127.0.0.1", "tag_name": "{ver_diff}"}}'
# simulate cache file
mocker.patch("os.path.exists", return_value=True)
mocker.patch("os.path.getmtime", return_value=time.time())
Expand Down