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 obsolete noqa statements #944

Merged
merged 1 commit into from
Jul 1, 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
2 changes: 1 addition & 1 deletion nornir/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def run(

raise_on_error = (
raise_on_error if raise_on_error is not None else self.config.core.raise_on_error
) # noqa
)
if raise_on_error:
result.raise_on_error()
else:
Expand Down
2 changes: 1 addition & 1 deletion nornir/core/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def configure(self) -> None:
"This can lead to unexpected logging results. "
"Please set logging.enabled config to False "
"to disable automatic Nornir logging configuration. Refer to "
"https://nornir.readthedocs.io/en/stable/configuration/index.html#logging" # noqa
"https://nornir.readthedocs.io/en/stable/configuration/index.html#logging"
)
warnings.warn(msg, ConflictingConfigurationWarning)

Expand Down
2 changes: 1 addition & 1 deletion nornir/core/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if TYPE_CHECKING:
from nornir.core.connection import Connection
from nornir.core.result import AggregatedResult, MultiResult, Result # noqa
from nornir.core.result import AggregatedResult, MultiResult, Result
from nornir.core.tasks import Task


Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ ignore = [
"RSE102", # Unnecessary parentheses on raised exception
"RUF001", # String contains ambiguous `–` (EN DASH). Did you mean `-` (HYPHEN-MINUS)?
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"RUF100", # Unused blanket `noqa` directive
"S701", # By default, jinja2 sets `autoescape` to `False`. Consider using `autoescape=True` or the `select_autoescape` function to mitigate XSS vulnerabilities.
"SLF001", # Private member accessed
"SIM108", # Use ternary operator `config = Config.from_file(config_file, **kwargs) if config_file else Config.from_dict(**kwargs)` instead of `if`-`else`-block
Expand Down