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

Fix CI & linters. #75

Merged
merged 7 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[flake8]
# E501: Line length is enforced by Black, so flake8 doesn't need to check it
# W503: Black disagrees with this rule, as does PEP 8; Black wins
ignore = E501, W503
# E701: E701 multiple statements on one line (colon). Doesn't like pydantic class attrs "device_type: DeviceTypeRef"
# E251: Spaces around None in default function argument. Black disagrees with this rule, as does PEP 8; Black wins
ignore = E501, W503, E701, E251
4 changes: 2 additions & 2 deletions nautobot_netbox_importer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# Python version < 3.8
import importlib_metadata as metadata

__version__ = metadata.version(__name__)

from nautobot.extras.plugins import PluginConfig

__version__ = metadata.version(__name__)


class NautobotNetboxImporterConfig(PluginConfig):
"""Plugin configuration for the nautobot-netbox-importer plugin."""
Expand Down
3 changes: 2 additions & 1 deletion nautobot_netbox_importer/diffsync/adapters/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def add(self, obj: DiffSyncModel):
# in case we have duplicate objects with the same unique_id but different PKs.
modelname = obj.get_type()
if obj.pk in self._data_by_pk[modelname]:
raise ObjectAlreadyExists(f"Object {modelname} with pk {obj.pk} already loaded")
raise ObjectAlreadyExists(f"Object {modelname} with pk {obj.pk} already loaded") # pylint: disable=E1120
pszulczewski marked this conversation as resolved.
Show resolved Hide resolved
self._data_by_pk[modelname][obj.pk] = obj
super().add(obj)

Expand Down Expand Up @@ -288,6 +288,7 @@ def make_model(self, diffsync_model, data):
)
return instance

# pylint: disable=W0221
pszulczewski marked this conversation as resolved.
Show resolved Hide resolved
def sync_from(
self,
source: DiffSync,
Expand Down
Loading