Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Add typing where missing.
Remove extra underscore from method.

Reference: pypa#1897
Philippe Ombredanne <[email protected]>

Co-authored-by: Cooper Lees <[email protected]>
  • Loading branch information
pombredanne and cooperlees authored Mar 6, 2025
1 parent f93e687 commit 262a137
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bandersnatch/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async def fetch_simple_index(self) -> Any:
simple_index = await response.json()
return simple_index

async def all_packages(self) -> Any:
async def all_packages(self) -> dict[str, int]:
"""Return a mapping of all project names as {name: last_serial}"""
simple_index = await self.fetch_simple_index()
if not simple_index:
Expand Down
2 changes: 1 addition & 1 deletion src/bandersnatch/tests/test_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def test_master_url_fetch(master: Master) -> None:


@pytest.mark.asyncio
async def test__simple_index_user_agent(master: Master) -> None:
async def test_simple_index_user_agent(master: Master) -> None:
headers = master._custom_headers
assert f"bandersnatch {bandersnatch.__version__}" in headers["User-Agent"]

Expand Down

0 comments on commit 262a137

Please sign in to comment.