Skip to content

Commit

Permalink
Merge branch 'main' into ogenstad/optional-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Jun 12, 2024
2 parents ce52022 + 123909f commit 710109d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Only latest version is supported.

## Reporting a Vulnerability

To report a vulnerability feel free to reach out on [slack](https://github.com/nornir-automation/nornir#contact--support) so we can fix before a public disclosure.
To report a vulnerability feel free to reach out privately on [GitHub](https://github.com/nornir-automation/nornir/security/advisories/new) so we can fix before a public disclosure.
If the issue is on a dependency feel free to open a PR bumping such depdency without contacting us first.
9 changes: 3 additions & 6 deletions nornir/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import logging.config
import types
from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, List, Optional, Type
from typing import Any, Callable, Dict, Generator, List, Optional, Type

from nornir.core.configuration import Config
from nornir.core.exceptions import PluginNotRegistered
Expand All @@ -11,9 +11,6 @@
from nornir.core.state import GlobalState
from nornir.core.task import AggregatedResult, Task

if TYPE_CHECKING:
from nornir.core.inventory import Host # noqa: W0611

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -63,7 +60,7 @@ def __exit__(
def with_processors(self, processors: List[Processor]) -> "Nornir":
"""
Given a list of Processor objects return a copy of the nornir object with the processors
assigned to the copy. The orinal object is left unmodified.
assigned to the copy. The original object is left unmodified.
"""
return Nornir(
**{**self._clone_parameters(), **{"processors": Processors(processors)}}
Expand All @@ -72,7 +69,7 @@ def with_processors(self, processors: List[Processor]) -> "Nornir":
def with_runner(self, runner: RunnerPlugin) -> "Nornir":
"""
Given a runner return a copy of the nornir object with the runner
assigned to the copy. The orinal object is left unmodified.
assigned to the copy. The original object is left unmodified.
"""
return Nornir(**{**self._clone_parameters(), **{"runner": runner}})

Expand Down

0 comments on commit 710109d

Please sign in to comment.