Skip to content

Commit

Permalink
Merge branch 'dev' into dependabot/pip/dev/pytest-7.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandreteles authored Nov 19, 2023
2 parents 99d62c6 + fe3c32a commit 827b3e2
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.11.0
hooks:
- id: black
language_version: python3.11
Expand Down
10 changes: 9 additions & 1 deletion api/backends/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,22 @@ class Asset(dict):
Attributes:
- name (str): The name of the asset.
- content_type (str): The MIME type of the asset content.
- download_count (int): The number of times the asset has been downloaded.
- download_url (str): The URL to download the asset.
"""

def __init__(self, name: str, content_type: str, browser_download_url: str):
def __init__(
self,
name: str,
content_type: str,
download_count: int,
browser_download_url: str,
):
dict.__init__(
self,
name=name,
content_type=content_type,
download_count=download_count,
browser_download_url=browser_download_url,
)

Expand Down
3 changes: 2 additions & 1 deletion api/backends/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def __init__(self):
async def __assemble_release(release: dict) -> Release:
async def __assemble_asset(asset: dict) -> Asset:
asset_data: dict = keyfilter(
lambda key: key in {"name", "content_type", "browser_download_url"},
lambda key: key
in {"name", "content_type", "download_count", "browser_download_url"},
asset,
)
return Asset(**asset_data)
Expand Down
1 change: 1 addition & 0 deletions api/models/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class AssetFields(BaseModel):

name: str
content_type: str
download_count: int
browser_download_url: str


Expand Down
65 changes: 34 additions & 31 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 @@ -32,7 +32,7 @@ sqlalchemy = "^2.0.22"
sanic-beskar = "^2.2.12"
bson = "^0.5.10"
fastpbkdf2 = "^0.2"
cryptography = "^41.0.4"
cryptography = "^41.0.5"
sanic-limiter = { git = "https://github.com/Omegastick/sanic-limiter" }

[tool.pytest.ini_options]
Expand Down

0 comments on commit 827b3e2

Please sign in to comment.