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 N from ruff ignores #3328

Merged
merged 3 commits into from
Apr 24, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ ignore = [
"D",
"G",
"RET",
"N",
"EM",
"EXE",
"FBT",
Expand Down
6 changes: 3 additions & 3 deletions src/ansiblelint/rules/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def load_module(module_name: str) -> PluginLoadContext:
return module_loader.find_plugin_with_context(module_name)


class ValidationPassed(Exception):
class ValidationPassedError(Exception):
"""Exception to be raised when validation passes."""


Expand All @@ -78,7 +78,7 @@ class CustomAnsibleModule(basic.AnsibleModule): # type: ignore
def __init__(self, *args: str, **kwargs: str) -> None:
"""Initialize AnsibleModule mock."""
super().__init__(*args, **kwargs)
raise ValidationPassed
raise ValidationPassedError


class ArgsRule(AnsibleLintRule):
Expand Down Expand Up @@ -180,7 +180,7 @@ def matchtask(

sanitized_results = self._sanitize_results(results, module_name)
return sanitized_results
except ValidationPassed:
except ValidationPassedError:
return []

# pylint: disable=unused-argument
Expand Down