diff --git a/nornir/core/exceptions.py b/nornir/core/exceptions.py index a5616faf..01599bb1 100644 --- a/nornir/core/exceptions.py +++ b/nornir/core/exceptions.py @@ -20,32 +20,24 @@ class ConnectionAlreadyOpen(ConnectionException): Raised when opening an already opened connection """ - pass - class ConnectionNotOpen(ConnectionException): """ Raised when trying to close a connection that isn't open """ - pass - class PluginAlreadyRegistered(Exception): """ Raised when trying to register an already registered plugin """ - pass - class PluginNotRegistered(Exception): """ Raised when trying to access a plugin that is not registered """ - pass - class NornirExecutionError(Exception): """ @@ -96,8 +88,6 @@ class NornirNoValidInventoryError(Exception): Raised by nornir when :meth:`nornir.plugins.inventory.parse` fails to load any valid inventory """ - pass - class ConflictingConfigurationWarning(UserWarning): pass diff --git a/nornir/core/plugins/connections.py b/nornir/core/plugins/connections.py index f2324bdd..747a4e41 100644 --- a/nornir/core/plugins/connections.py +++ b/nornir/core/plugins/connections.py @@ -21,18 +21,15 @@ def open( Connect to the device and populate the attribute :attr:`connection` with the underlying connection """ - pass def close(self) -> None: """Close the connection with the device""" - pass @property def connection(self) -> Any: """ Established connection """ - pass ConnectionPluginRegister: PluginRegister[Type[ConnectionPlugin]] = PluginRegister( diff --git a/pyproject.toml b/pyproject.toml index e6647c8f..0b36460d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -143,7 +143,6 @@ ignore = [ "N804", # First argument of a class method should be named `cls` "PERF203", # `try`-`except` within a loop incurs performance overhead "PGH004", # Use specific rule codes when using `noqa` - "PIE790", # Unnecessary `pass` statement "PIE800", # Unnecessary spread `**` "PLC0205", # Class `__slots__` should be a non-string iterable "PLC2801", # Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function