mirror of
https://github.com/revanced/revanced-releases-api.git
synced 2025-05-03 15:44:26 +02:00
add pydantic support to mypy
This commit is contained in:
parent
7a9f23e75a
commit
f559730107
22
main.py
22
main.py
@ -1,19 +1,19 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import toml
|
import toml #type: ignore
|
||||||
import uvicorn
|
import uvicorn #type: ignore
|
||||||
import aioredis
|
import aioredis #type: ignore
|
||||||
from fastapi import FastAPI, Request, Response
|
from fastapi import FastAPI, Request, Response #type: ignore
|
||||||
from modules.Releases import Releases
|
from modules.Releases import Releases
|
||||||
from fastapi.responses import RedirectResponse
|
from fastapi.responses import RedirectResponse #type: ignore
|
||||||
import modules.ResponseModels as ResponseModels
|
import modules.ResponseModels as ResponseModels
|
||||||
from slowapi import Limiter, _rate_limit_exceeded_handler
|
from slowapi import Limiter, _rate_limit_exceeded_handler #type: ignore
|
||||||
from slowapi.util import get_remote_address
|
from slowapi.util import get_remote_address #type: ignore
|
||||||
from slowapi.errors import RateLimitExceeded
|
from slowapi.errors import RateLimitExceeded #type: ignore
|
||||||
from fastapi_cache import FastAPICache
|
from fastapi_cache import FastAPICache #type: ignore
|
||||||
from fastapi_cache.backends.redis import RedisBackend
|
from fastapi_cache.backends.redis import RedisBackend #type: ignore
|
||||||
from fastapi_cache.decorator import cache
|
from fastapi_cache.decorator import cache #type: ignore
|
||||||
|
|
||||||
"""Get latest ReVanced releases from GitHub API."""
|
"""Get latest ReVanced releases from GitHub API."""
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import toml
|
import toml #type: ignore
|
||||||
import msgpack
|
import msgpack #type: ignore
|
||||||
import aioredis
|
import aioredis #type: ignore
|
||||||
|
|
||||||
# Load config
|
# Load config
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import orjson
|
import orjson #type: ignore
|
||||||
import httpx_cache
|
import httpx_cache #type: ignore
|
||||||
from base64 import b64decode
|
from base64 import b64decode
|
||||||
from modules.InternalCache import InternalCache
|
from modules.InternalCache import InternalCache
|
||||||
|
|
||||||
|
10
poetry.lock
generated
10
poetry.lock
generated
@ -104,7 +104,7 @@ dev = ["PyTest (<5)", "PyTest-Cov (<2.6)", "bump2version (<1)", "configparser (<
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fastapi"
|
name = "fastapi"
|
||||||
version = "0.81.0"
|
version = "0.82.0"
|
||||||
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
|
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
@ -497,7 +497,7 @@ python-versions = ">=3.7"
|
|||||||
name = "types-toml"
|
name = "types-toml"
|
||||||
version = "0.10.8"
|
version = "0.10.8"
|
||||||
description = "Typing stubs for toml"
|
description = "Typing stubs for toml"
|
||||||
category = "main"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
|
|
||||||
@ -574,7 +574,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
content-hash = "33285f8fe530773f3688461fbe9c4261fdf08d05480014eb59512d86b21bf491"
|
content-hash = "2b0b56a7745c55184de59a2ef30f617e8ba020382033e4fc855147ba096637a3"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
aioredis = [
|
aioredis = [
|
||||||
@ -614,8 +614,8 @@ deprecated = [
|
|||||||
{file = "Deprecated-1.2.13.tar.gz", hash = "sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d"},
|
{file = "Deprecated-1.2.13.tar.gz", hash = "sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d"},
|
||||||
]
|
]
|
||||||
fastapi = [
|
fastapi = [
|
||||||
{file = "fastapi-0.81.0-py3-none-any.whl", hash = "sha256:9ac5f5d252b4b394df29accb1ed4bedf30e0e87fc6eb7ec75e1449fa040bfc17"},
|
{file = "fastapi-0.82.0-py3-none-any.whl", hash = "sha256:a4269329a7374c78f6e92c195d14cc4ce3a525e25b79e62edf2df8196469743f"},
|
||||||
{file = "fastapi-0.81.0.tar.gz", hash = "sha256:9dafdc41feda85ee5acf0f7dd6bcb7fd946318a6664b41fd33e33b26f666a346"},
|
{file = "fastapi-0.82.0.tar.gz", hash = "sha256:5ee7b7473a55940a18d4869ff57d29c372363bf8d3033a0e660a8cf38b1d3d9e"},
|
||||||
]
|
]
|
||||||
fastapi-cache2 = [
|
fastapi-cache2 = [
|
||||||
{file = "fastapi-cache2-0.1.9.tar.gz", hash = "sha256:816612f7b29b4ea4ed3b4e03c55b7f96b4e4d6dffce6a95e2cf5cf36a980eaaa"},
|
{file = "fastapi-cache2-0.1.9.tar.gz", hash = "sha256:816612f7b29b4ea4ed3b4e03c55b7f96b4e4d6dffce6a95e2cf5cf36a980eaaa"},
|
||||||
|
@ -18,7 +18,7 @@ fastapi-cache2 = ">=0.1.9"
|
|||||||
aioredis = {version = ">=2.0.1", extras = ["hiredis"]}
|
aioredis = {version = ">=2.0.1", extras = ["hiredis"]}
|
||||||
redis = ">=4.3.4"
|
redis = ">=4.3.4"
|
||||||
msgpack = ">=1.0.4"
|
msgpack = ">=1.0.4"
|
||||||
types-toml = ">=0.10.8"
|
pydantic = ">=1.10.1"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
mypy = ">=0.971"
|
mypy = ">=0.971"
|
||||||
@ -33,6 +33,7 @@ fastapi-cache2 = ">=0.1.9"
|
|||||||
aioredis = {version = ">=2.0.1", extras = ["hiredis"]}
|
aioredis = {version = ">=2.0.1", extras = ["hiredis"]}
|
||||||
redis = ">=4.3.4"
|
redis = ">=4.3.4"
|
||||||
msgpack = ">=1.0.4"
|
msgpack = ">=1.0.4"
|
||||||
|
pydantic = ">=1.10.1"
|
||||||
types-toml = ">=0.10.8"
|
types-toml = ">=0.10.8"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
@ -8,7 +8,7 @@ click==8.1.3; python_version >= "3.7" and python_version < "4.0"
|
|||||||
colorama==0.4.5; python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" and python_version < "4.0" and platform_system == "Windows" or sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.5.0" and python_version < "4.0" and platform_system == "Windows"
|
colorama==0.4.5; python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" and python_version < "4.0" and platform_system == "Windows" or sys_platform == "win32" and python_version >= "3.7" and python_full_version >= "3.5.0" and python_version < "4.0" and platform_system == "Windows"
|
||||||
deprecated==1.2.13; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
|
deprecated==1.2.13; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
|
||||||
fastapi-cache2==0.1.9; python_version >= "3.7" and python_version < "4.0"
|
fastapi-cache2==0.1.9; python_version >= "3.7" and python_version < "4.0"
|
||||||
fastapi==0.81.0; python_full_version >= "3.6.1"
|
fastapi==0.82.0; python_full_version >= "3.6.1"
|
||||||
fasteners==0.17.3; python_version >= "3.7" and python_version < "4.0"
|
fasteners==0.17.3; python_version >= "3.7" and python_version < "4.0"
|
||||||
h11==0.12.0; python_version >= "3.7" and python_version < "4.0"
|
h11==0.12.0; python_version >= "3.7" and python_version < "4.0"
|
||||||
h2==4.1.0; python_version >= "3.7" and python_full_version >= "3.6.1" and python_version < "4.0"
|
h2==4.1.0; python_version >= "3.7" and python_full_version >= "3.6.1" and python_version < "4.0"
|
||||||
@ -25,7 +25,7 @@ msgpack==1.0.4
|
|||||||
orjson==3.8.0; python_version >= "3.7"
|
orjson==3.8.0; python_version >= "3.7"
|
||||||
packaging==21.3; python_version >= "3.6"
|
packaging==21.3; python_version >= "3.6"
|
||||||
pendulum==2.1.2; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0"
|
pendulum==2.1.2; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0"
|
||||||
pydantic==1.10.1; python_version >= "3.7" and python_full_version >= "3.6.1" and python_version < "4.0"
|
pydantic==1.10.1; python_version >= "3.7"
|
||||||
pyparsing==3.0.9; python_full_version >= "3.6.8" and python_version >= "3.6"
|
pyparsing==3.0.9; python_full_version >= "3.6.8" and python_version >= "3.6"
|
||||||
python-dateutil==2.8.2; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0"
|
python-dateutil==2.8.2; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0"
|
||||||
python-dotenv==0.21.0; python_version >= "3.7" and python_version < "4.0"
|
python-dotenv==0.21.0; python_version >= "3.7" and python_version < "4.0"
|
||||||
@ -38,7 +38,6 @@ slowapi==0.1.6; python_version >= "3.7" and python_version < "4.0"
|
|||||||
sniffio==1.3.0; python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.2"
|
sniffio==1.3.0; python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.2"
|
||||||
starlette==0.19.1; python_version >= "3.7" and python_full_version >= "3.6.1" and python_version < "4.0"
|
starlette==0.19.1; python_version >= "3.7" and python_full_version >= "3.6.1" and python_version < "4.0"
|
||||||
toml==0.10.2; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
|
toml==0.10.2; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
|
||||||
types-toml==0.10.8
|
|
||||||
typing-extensions==4.3.0; python_version >= "3.7" and python_full_version >= "3.6.1" and python_version < "4.0"
|
typing-extensions==4.3.0; python_version >= "3.7" and python_full_version >= "3.6.1" and python_version < "4.0"
|
||||||
uvicorn==0.18.3; python_version >= "3.7"
|
uvicorn==0.18.3; python_version >= "3.7"
|
||||||
uvloop==0.16.0; sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy" and python_version >= "3.7" and python_version < "4.0"
|
uvloop==0.16.0; sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy" and python_version >= "3.7" and python_version < "4.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user