diff --git a/Company-Project/src/nextjs/tests/test_page_preview_api.py b/Company-Project/src/nextjs/tests/test_page_preview_api.py index 555edf82a..5507d3656 100644 --- a/Company-Project/src/nextjs/tests/test_page_preview_api.py +++ b/Company-Project/src/nextjs/tests/test_page_preview_api.py @@ -23,7 +23,9 @@ def test_missing_args_returns_400(self): def test_preview_retrieval(self): sub_page = HomePageFactory.create(title="Child page", parent=self.root_page) preview = sub_page.create_page_preview() - content_type = ContentType.objects.get_for_model(sub_page.__class__) + content_type = ContentType.objects.get_for_model( # type: ignore[attr-defined] + sub_page.__class__ + ) token = preview.token content_type_str = f"{content_type.app_label}.{content_type.model}" diff --git a/Company-Project/src/pipit/management/commands/create_superuser_if_none_exists.py b/Company-Project/src/pipit/management/commands/create_superuser_if_none_exists.py index 50e05480b..433a89f2c 100644 --- a/Company-Project/src/pipit/management/commands/create_superuser_if_none_exists.py +++ b/Company-Project/src/pipit/management/commands/create_superuser_if_none_exists.py @@ -25,6 +25,10 @@ def handle(self, *args, **options): password = options["password"] email = options["email"] - User.objects.create_superuser(username=username, password=password, email=email) + User.objects.create_superuser( # type: ignore[attr-defined] + username=username, + password=password, + email=email, + ) self.stdout.write('Local user "{}" was created'.format(username)) diff --git a/{{cookiecutter.project_name}}/src/nextjs/tests/test_page_preview_api.py b/{{cookiecutter.project_name}}/src/nextjs/tests/test_page_preview_api.py index 555edf82a..5507d3656 100644 --- a/{{cookiecutter.project_name}}/src/nextjs/tests/test_page_preview_api.py +++ b/{{cookiecutter.project_name}}/src/nextjs/tests/test_page_preview_api.py @@ -23,7 +23,9 @@ def test_missing_args_returns_400(self): def test_preview_retrieval(self): sub_page = HomePageFactory.create(title="Child page", parent=self.root_page) preview = sub_page.create_page_preview() - content_type = ContentType.objects.get_for_model(sub_page.__class__) + content_type = ContentType.objects.get_for_model( # type: ignore[attr-defined] + sub_page.__class__ + ) token = preview.token content_type_str = f"{content_type.app_label}.{content_type.model}" diff --git a/{{cookiecutter.project_name}}/src/pipit/management/commands/create_superuser_if_none_exists.py b/{{cookiecutter.project_name}}/src/pipit/management/commands/create_superuser_if_none_exists.py index 50e05480b..433a89f2c 100644 --- a/{{cookiecutter.project_name}}/src/pipit/management/commands/create_superuser_if_none_exists.py +++ b/{{cookiecutter.project_name}}/src/pipit/management/commands/create_superuser_if_none_exists.py @@ -25,6 +25,10 @@ def handle(self, *args, **options): password = options["password"] email = options["email"] - User.objects.create_superuser(username=username, password=password, email=email) + User.objects.create_superuser( # type: ignore[attr-defined] + username=username, + password=password, + email=email, + ) self.stdout.write('Local user "{}" was created'.format(username))