Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ coverage = {version = "7.5.1", extras = ["toml"]}
mypy = "1.10.0"
pre-commit = "3.7.1"
pre-commit-hooks = "4.6.0"
pylint = "3.1.1"
pylint = "3.2.0"
pytest = "7.4.4"
pytest-asyncio = "0.23.6"
pytest-cov = "5.0.0"
Expand Down
9 changes: 7 additions & 2 deletions src/radios/radio_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async def countries( # noqa: PLR0913
)

countries = orjson.loads(countries_data) # pylint: disable=no-member
for country in countries:
for country in countries: # pylint: disable=not-an-iterable
country["code"] = country["name"]
# https://github.com/frenck/python-radios/issues/19
if country["name"] == "XK":
Expand All @@ -190,6 +190,7 @@ async def countries( # noqa: PLR0913
if order == Order.NAME:
countries.sort(key=lambda country: country["name"])

# pylint: disable-next=not-an-iterable
return [Country.from_dict(country) for country in countries]

# pylint: disable-next=too-many-arguments
Expand Down Expand Up @@ -229,9 +230,10 @@ async def languages( # noqa: PLR0913
)

languages = orjson.loads(languages_data) # pylint: disable=no-member
for language in languages:
for language in languages: # pylint: disable=not-an-iterable
language["name"] = language["name"].title()

# pylint: disable-next=not-an-iterable
return [Language.from_dict(language) for language in languages]

# pylint: disable-next=too-many-arguments, too-many-locals
Expand Down Expand Up @@ -307,6 +309,7 @@ async def search( # noqa: PLR0913
},
)
stations = orjson.loads(stations_data) # pylint: disable=no-member
# pylint: disable-next=not-an-iterable
return [Station.from_dict(station) for station in stations]

async def station(self, *, uuid: str) -> Station | None:
Expand Down Expand Up @@ -376,6 +379,7 @@ async def stations( # noqa: PLR0913
},
)
stations = orjson.loads(stations_data) # pylint: disable=no-member
# pylint: disable-next=not-an-iterable
return [Station.from_dict(station) for station in stations]

# pylint: disable-next=too-many-arguments
Expand Down Expand Up @@ -414,6 +418,7 @@ async def tags( # noqa: PLR0913
},
)
tags = orjson.loads(tags_data) # pylint: disable=no-member
# pylint: disable-next=not-an-iterable
return [Tag.from_dict(tag) for tag in tags]

async def close(self) -> None:
Expand Down