Skip to content

Commit

Permalink
Remove ISC from ruff ignores (#3342)
Browse files Browse the repository at this point in the history
Co-authored-by: Ajinkya Udgirkar <ajinkyaudgirkar@gmail.com>
  • Loading branch information
shatakshiiii and audgirka authored Apr 25, 2023
1 parent 86b9633 commit 3037226
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 15 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 3037226

Please # to comment.