From 651bb9261c98d3fd015ec52c716e2481b653af3b Mon Sep 17 00:00:00 2001 From: Jonas L Date: Mon, 18 Dec 2023 18:54:07 +0100 Subject: [PATCH] chore(api): disable duplicate-code check (#2799) * chore(api): disable duplicate-code check * refactor: fix linting errors --- api/libretime_api/permission_constants.py | 2 +- api/libretime_api/schedule/models/show.py | 2 +- api/pyproject.toml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/libretime_api/permission_constants.py b/api/libretime_api/permission_constants.py index 01890e24a..51a95e100 100644 --- a/api/libretime_api/permission_constants.py +++ b/api/libretime_api/permission_constants.py @@ -1,4 +1,4 @@ -from .core.models import Role +from .core.models.role import Role GUEST_PERMISSIONS = [ "view_schedule", diff --git a/api/libretime_api/schedule/models/show.py b/api/libretime_api/schedule/models/show.py index ce13f689e..a1a6cecf3 100644 --- a/api/libretime_api/schedule/models/show.py +++ b/api/libretime_api/schedule/models/show.py @@ -69,7 +69,7 @@ class Show(models.Model): auto_playlist_enabled = models.BooleanField(db_column="has_autoplaylist") auto_playlist_repeat = models.BooleanField(db_column="autoplaylist_repeat") - hosts = models.ManyToManyField( + hosts = models.ManyToManyField( # type: ignore[var-annotated] "core.User", through="ShowHost", ) diff --git a/api/pyproject.toml b/api/pyproject.toml index 6cb37f6cd..4a31d530b 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -10,6 +10,7 @@ django-settings-module = "libretime_api.settings.testing" [tool.pylint.messages_control] extension-pkg-whitelist = "pydantic" disable = [ + "duplicate-code", "fixme", "missing-class-docstring", "missing-function-docstring",