chore: Align with flake8 6.1 rules

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2737>
This commit is contained in:
Georg Krause 2024-02-02 14:36:55 +01:00
parent f58a33ec02
commit d82eceecae
4 changed files with 3 additions and 6 deletions

View File

@ -10,7 +10,7 @@ class Command(BaseCommand):
self.help = "Helper to generate randomized testdata" self.help = "Helper to generate randomized testdata"
self.type_choices = {"notifications": self.handle_notifications} self.type_choices = {"notifications": self.handle_notifications}
self.missing_args_message = f"Please specify one of the following sub-commands: { *self.type_choices.keys(), }" self.missing_args_message = f"Please specify one of the following sub-commands: {*self.type_choices.keys(), }"
def add_arguments(self, parser): def add_arguments(self, parser):
subparsers = parser.add_subparsers(dest="subcommand") subparsers = parser.add_subparsers(dest="subcommand")

View File

@ -93,7 +93,6 @@ class SerializedPreference(types.BasePreferenceType):
serializer serializer
""" """
serializer = JSONSerializer
data_serializer_class = None data_serializer_class = None
field_class = JSONField field_class = JSONField
widget = forms.Textarea widget = forms.Textarea

View File

@ -297,8 +297,6 @@ class LibraryViewSet(
) )
instance.delete() instance.delete()
follows = action
@extend_schema( @extend_schema(
responses=federation_api_serializers.LibraryFollowSerializer(many=True) responses=federation_api_serializers.LibraryFollowSerializer(many=True)
) )

View File

@ -198,8 +198,8 @@ def test_can_get_pictures(name):
cover_data = data.get_picture("cover_front", "other") cover_data = data.get_picture("cover_front", "other")
assert cover_data["mimetype"].startswith("image/") assert cover_data["mimetype"].startswith("image/")
assert len(cover_data["content"]) > 0 assert len(cover_data["content"]) > 0
assert type(cover_data["content"]) == bytes assert type(cover_data["content"]) is bytes
assert type(cover_data["description"]) == str assert type(cover_data["description"]) is str
@pytest.mark.parametrize( @pytest.mark.parametrize(