style: format code using black v23

This commit is contained in:
jo 2023-03-28 19:34:19 +02:00
commit 22c255700e
No known key found for this signature in database
GPG key ID: B2FEC9B22722B984
46 changed files with 8 additions and 67 deletions

View file

@ -135,7 +135,6 @@ def test_clean_config_is_called_on_serializer_save(mocker, factories):
@pytest.mark.parametrize("radio_type", ["random", "less-listened", "favorites"])
def test_create_radio_session(radio_type, logged_in_api_client):
url = reverse("api:v1:radios:sessions-list")
response = logged_in_api_client.post(url, {"radio_type": radio_type})

View file

@ -2,7 +2,6 @@ from funkwhale_api.radios import filters
def test_clean_config_artist_name_sorting(factories):
artist3 = factories["music.Artist"](name="The Green Eyes")
artist2 = factories["music.Artist"](name="The Green Eyed Machine")
artist1 = factories["music.Artist"](name="The Green Seed")
@ -21,7 +20,6 @@ def test_clean_config_artist_name_sorting(factories):
def test_clean_config_tag_name_sorting(factories):
tag3 = factories["tags.Tag"](name="Rock")
tag2 = factories["tags.Tag"](name="Classic")
tag1 = factories["tags.Tag"](name="Punk")

View file

@ -419,7 +419,7 @@ def test_can_start_custom_multiple_radio_from_api(api_client, factories):
tracks = factories["music.Track"].create_batch(5)
url = reverse("api:v1:radios:sessions-list")
map_filters_to_type = {"tags": "names", "artists": "ids", "playlists": "names"}
for (key, value) in map_filters_to_type.items():
for key, value in map_filters_to_type.items():
attr = value[:-1]
track_filter_key = [getattr(a.artist, attr) for a in tracks]
config = {"filters": [{"type": key, value: track_filter_key}]}