From 242a146eeea284ee5c1252eac7cc39e4fe944c31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 21:24:11 -0300 Subject: [PATCH 01/13] chore(deps): bump mypy from 1.4.1 to 1.5.0 (#59) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 63 +++++++++++++++++++++++--------------------------- pyproject.toml | 2 +- 2 files changed, 30 insertions(+), 35 deletions(-) diff --git a/poetry.lock b/poetry.lock index 297aa744..39da0460 100644 --- a/poetry.lock +++ b/poetry.lock @@ -863,7 +863,7 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] @@ -1081,37 +1081,33 @@ files = [ [[package]] name = "mypy" -version = "1.4.1" +version = "1.5.0" description = "Optional static typing for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "mypy-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:566e72b0cd6598503e48ea610e0052d1b8168e60a46e0bfd34b3acf2d57f96a8"}, - {file = "mypy-1.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca637024ca67ab24a7fd6f65d280572c3794665eaf5edcc7e90a866544076878"}, - {file = "mypy-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0dde1d180cd84f0624c5dcaaa89c89775550a675aff96b5848de78fb11adabcd"}, - {file = "mypy-1.4.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8c4d8e89aa7de683e2056a581ce63c46a0c41e31bd2b6d34144e2c80f5ea53dc"}, - {file = "mypy-1.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:bfdca17c36ae01a21274a3c387a63aa1aafe72bff976522886869ef131b937f1"}, - {file = "mypy-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7549fbf655e5825d787bbc9ecf6028731973f78088fbca3a1f4145c39ef09462"}, - {file = "mypy-1.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:98324ec3ecf12296e6422939e54763faedbfcc502ea4a4c38502082711867258"}, - {file = "mypy-1.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:141dedfdbfe8a04142881ff30ce6e6653c9685b354876b12e4fe6c78598b45e2"}, - {file = "mypy-1.4.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8207b7105829eca6f3d774f64a904190bb2231de91b8b186d21ffd98005f14a7"}, - {file = "mypy-1.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:16f0db5b641ba159eff72cff08edc3875f2b62b2fa2bc24f68c1e7a4e8232d01"}, - {file = "mypy-1.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:470c969bb3f9a9efcedbadcd19a74ffb34a25f8e6b0e02dae7c0e71f8372f97b"}, - {file = "mypy-1.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5952d2d18b79f7dc25e62e014fe5a23eb1a3d2bc66318df8988a01b1a037c5b"}, - {file = "mypy-1.4.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:190b6bab0302cec4e9e6767d3eb66085aef2a1cc98fe04936d8a42ed2ba77bb7"}, - {file = "mypy-1.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9d40652cc4fe33871ad3338581dca3297ff5f2213d0df345bcfbde5162abf0c9"}, - {file = "mypy-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:01fd2e9f85622d981fd9063bfaef1aed6e336eaacca00892cd2d82801ab7c042"}, - {file = "mypy-1.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2460a58faeea905aeb1b9b36f5065f2dc9a9c6e4c992a6499a2360c6c74ceca3"}, - {file = "mypy-1.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2746d69a8196698146a3dbe29104f9eb6a2a4d8a27878d92169a6c0b74435b6"}, - {file = "mypy-1.4.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ae704dcfaa180ff7c4cfbad23e74321a2b774f92ca77fd94ce1049175a21c97f"}, - {file = "mypy-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:43d24f6437925ce50139a310a64b2ab048cb2d3694c84c71c3f2a1626d8101dc"}, - {file = "mypy-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c482e1246726616088532b5e964e39765b6d1520791348e6c9dc3af25b233828"}, - {file = "mypy-1.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:43b592511672017f5b1a483527fd2684347fdffc041c9ef53428c8dc530f79a3"}, - {file = "mypy-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:34a9239d5b3502c17f07fd7c0b2ae6b7dd7d7f6af35fbb5072c6208e76295816"}, - {file = "mypy-1.4.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5703097c4936bbb9e9bce41478c8d08edd2865e177dc4c52be759f81ee4dd26c"}, - {file = "mypy-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:e02d700ec8d9b1859790c0475df4e4092c7bf3272a4fd2c9f33d87fac4427b8f"}, - {file = "mypy-1.4.1-py3-none-any.whl", hash = "sha256:45d32cec14e7b97af848bddd97d85ea4f0db4d5a149ed9676caa4eb2f7402bb4"}, - {file = "mypy-1.4.1.tar.gz", hash = "sha256:9bbcd9ab8ea1f2e1c8031c21445b511442cc45c89951e49bbf852cbb70755b1b"}, + {file = "mypy-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ad3109bec37cc33654de8db30fe8ff3a1bb57ea65144167d68185e6dced9868d"}, + {file = "mypy-1.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b4ea3a0241cb005b0ccdbd318fb99619b21ae51bcf1660b95fc22e0e7d3ba4a1"}, + {file = "mypy-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1fe816e26e676c1311b9e04fd576543b873576d39439f7c24c8e5c7728391ecf"}, + {file = "mypy-1.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:42170e68adb1603ccdc55a30068f72bcfcde2ce650188e4c1b2a93018b826735"}, + {file = "mypy-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:d145b81a8214687cfc1f85c03663a5bbe736777410e5580e54d526e7e904f564"}, + {file = "mypy-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c36011320e452eb30bec38b9fd3ba20569dc9545d7d4540d967f3ea1fab9c374"}, + {file = "mypy-1.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f3940cf5845b2512b3ab95463198b0cdf87975dfd17fdcc6ce9709a9abe09e69"}, + {file = "mypy-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9166186c498170e1ff478a7f540846b2169243feb95bc228d39a67a1a450cdc6"}, + {file = "mypy-1.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:725b57a19b7408ef66a0fd9db59b5d3e528922250fb56e50bded27fea9ff28f0"}, + {file = "mypy-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:eec5c927aa4b3e8b4781840f1550079969926d0a22ce38075f6cfcf4b13e3eb4"}, + {file = "mypy-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:79c520aa24f21852206b5ff2cf746dc13020113aa73fa55af504635a96e62718"}, + {file = "mypy-1.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:769ddb6bfe55c2bd9c7d6d7020885a5ea14289619db7ee650e06b1ef0852c6f4"}, + {file = "mypy-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbf18f8db7e5f060d61c91e334d3b96d6bb624ddc9ee8a1cde407b737acbca2c"}, + {file = "mypy-1.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a2500ad063413bc873ae102cf655bf49889e0763b260a3a7cf544a0cbbf7e70a"}, + {file = "mypy-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:84cf9f7d8a8a22bb6a36444480f4cbf089c917a4179fbf7eea003ea931944a7f"}, + {file = "mypy-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a551ed0fc02455fe2c1fb0145160df8336b90ab80224739627b15ebe2b45e9dc"}, + {file = "mypy-1.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:372fd97293ed0076d52695849f59acbbb8461c4ab447858cdaeaf734a396d823"}, + {file = "mypy-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8a7444d6fcac7e2585b10abb91ad900a576da7af8f5cffffbff6065d9115813"}, + {file = "mypy-1.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:35b13335c6c46a386577a51f3d38b2b5d14aa619e9633bb756bd77205e4bd09f"}, + {file = "mypy-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:2c9d570f53908cbea326ad8f96028a673b814d9dca7515bf71d95fa662c3eb6f"}, + {file = "mypy-1.5.0-py3-none-any.whl", hash = "sha256:69b32d0dedd211b80f1b7435644e1ef83033a2af2ac65adcdc87c38db68a86be"}, + {file = "mypy-1.5.0.tar.gz", hash = "sha256:f3460f34b3839b9bc84ee3ed65076eb827cd99ed13ed08d723f9083cada4a212"}, ] [package.dependencies] @@ -1121,7 +1117,6 @@ typing-extensions = ">=4.1.0" [package.extras] dmypy = ["psutil (>=4.0)"] install-types = ["pip"] -python2 = ["typed-ast (>=1.4.0,<2)"] reports = ["lxml"] [[package]] @@ -1449,12 +1444,12 @@ uvloop = {version = ">=0.15.0", markers = "sys_platform != \"win32\" and impleme websockets = ">=10.0" [package.extras] -all = ["bandit", "beautifulsoup4", "black", "chardet (>=3.0.0,<4.0.0)", "coverage", "cryptography", "docutils", "enum-tools[sphinx]", "flake8", "isort (>=5.0.0)", "m2r2", "mistune (<2.0.0)", "mypy", "pygments", "pytest (>=7.1.0,<7.2.0)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "sphinx (>=2.1.2)", "sphinx-rtd-theme (>=0.4.3)", "towncrier", "tox", "types-ujson", "uvicorn (<0.15.0)"] -dev = ["bandit", "beautifulsoup4", "black", "chardet (>=3.0.0,<4.0.0)", "coverage", "cryptography", "docutils", "flake8", "isort (>=5.0.0)", "mypy", "pygments", "pytest (>=7.1.0,<7.2.0)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "towncrier", "tox", "types-ujson", "uvicorn (<0.15.0)"] +all = ["bandit", "beautifulsoup4", "black", "chardet (==3.*)", "coverage", "cryptography", "docutils", "enum-tools[sphinx]", "flake8", "isort (>=5.0.0)", "m2r2", "mistune (<2.0.0)", "mypy", "pygments", "pytest (==7.1.*)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "sphinx (>=2.1.2)", "sphinx-rtd-theme (>=0.4.3)", "towncrier", "tox", "types-ujson", "uvicorn (<0.15.0)"] +dev = ["bandit", "beautifulsoup4", "black", "chardet (==3.*)", "coverage", "cryptography", "docutils", "flake8", "isort (>=5.0.0)", "mypy", "pygments", "pytest (==7.1.*)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "towncrier", "tox", "types-ujson", "uvicorn (<0.15.0)"] docs = ["docutils", "enum-tools[sphinx]", "m2r2", "mistune (<2.0.0)", "pygments", "sphinx (>=2.1.2)", "sphinx-rtd-theme (>=0.4.3)"] ext = ["sanic-ext"] http3 = ["aioquic"] -test = ["bandit", "beautifulsoup4", "black", "chardet (>=3.0.0,<4.0.0)", "coverage", "docutils", "flake8", "isort (>=5.0.0)", "mypy", "pygments", "pytest (>=7.1.0,<7.2.0)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "types-ujson", "uvicorn (<0.15.0)"] +test = ["bandit", "beautifulsoup4", "black", "chardet (==3.*)", "coverage", "docutils", "flake8", "isort (>=5.0.0)", "mypy", "pygments", "pytest (==7.1.*)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "types-ujson", "uvicorn (<0.15.0)"] [[package]] name = "sanic-ext" @@ -1903,4 +1898,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "706106852ebbc50e725eb80f3ebf3851114fc9bb8186b4b5e6a9776f1c7c5ec7" +content-hash = "b5377305fde4c48c7e053a6451a50801de540948aa9f3149ac23041422011b4e" diff --git a/pyproject.toml b/pyproject.toml index 510b81bd..79b6a478 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ cytoolz = "^0.12.2" beautifulsoup4 = "^4.12.2" setuptools = "^68.0.0" lxml = "^4.9.3" -mypy = "^1.4.1" +mypy = "^1.5.0" types-ujson = "^5.8.0.1" types-aiofiles = "^23.1.0.5" sanic-testing = "^23.6.0" From 59ac1c27be23ec372cf7283bcf7e401fc498eb74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 21:29:00 -0300 Subject: [PATCH 02/13] chore(deps): bump types-beautifulsoup4 from 4.12.0.5 to 4.12.0.6 (#63) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 39da0460..0de92c8a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1570,13 +1570,13 @@ files = [ [[package]] name = "types-beautifulsoup4" -version = "4.12.0.5" +version = "4.12.0.6" description = "Typing stubs for beautifulsoup4" optional = false python-versions = "*" files = [ - {file = "types-beautifulsoup4-4.12.0.5.tar.gz", hash = "sha256:d9be456416a62a5b9740559592e1063a69d4b0a1b83911d878558c8ae8e07074"}, - {file = "types_beautifulsoup4-4.12.0.5-py3-none-any.whl", hash = "sha256:718364c8e6787884501c700b1d22b6c0a8711bf9d6c9bf96e1fba81495bc46a8"}, + {file = "types-beautifulsoup4-4.12.0.6.tar.gz", hash = "sha256:045ab285d3e540186e16133612f43f67e31f910e6d7578906b43a0ad8f811347"}, + {file = "types_beautifulsoup4-4.12.0.6-py3-none-any.whl", hash = "sha256:3da00d754e73afae0ec2793253af0cb9aa1ff2c730e34b31c60313da781b4f6f"}, ] [package.dependencies] @@ -1898,4 +1898,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "b5377305fde4c48c7e053a6451a50801de540948aa9f3149ac23041422011b4e" +content-hash = "13cc67e42813b969f20197b0cd9209e0e51c00a52b0b3015bd545280f6209f0b" diff --git a/pyproject.toml b/pyproject.toml index 79b6a478..b934bd2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ types-ujson = "^5.8.0.1" types-aiofiles = "^23.1.0.5" sanic-testing = "^23.6.0" pytest-asyncio = "^0.21.1" -types-beautifulsoup4 = "^4.12.0.5" +types-beautifulsoup4 = "^4.12.0.6" pytest-md = "^0.2.0" pytest-emoji = "^0.2.0" coverage = "^7.2.7" From 586e6dadca941431209d0d9ddf72ce500e03c91e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 21:33:25 -0300 Subject: [PATCH 03/13] chore(deps): bump coverage from 7.2.7 to 7.3.0 (#62) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 118 +++++++++++++++++++++++-------------------------- pyproject.toml | 2 +- 2 files changed, 56 insertions(+), 64 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0de92c8a..188b46e8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -506,71 +506,63 @@ files = [ [[package]] name = "coverage" -version = "7.2.7" +version = "7.3.0" description = "Code coverage measurement for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "coverage-7.2.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d39b5b4f2a66ccae8b7263ac3c8170994b65266797fb96cbbfd3fb5b23921db8"}, - {file = "coverage-7.2.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6d040ef7c9859bb11dfeb056ff5b3872436e3b5e401817d87a31e1750b9ae2fb"}, - {file = "coverage-7.2.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba90a9563ba44a72fda2e85302c3abc71c5589cea608ca16c22b9804262aaeb6"}, - {file = "coverage-7.2.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7d9405291c6928619403db1d10bd07888888ec1abcbd9748fdaa971d7d661b2"}, - {file = "coverage-7.2.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31563e97dae5598556600466ad9beea39fb04e0229e61c12eaa206e0aa202063"}, - {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ebba1cd308ef115925421d3e6a586e655ca5a77b5bf41e02eb0e4562a111f2d1"}, - {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cb017fd1b2603ef59e374ba2063f593abe0fc45f2ad9abdde5b4d83bd922a353"}, - {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62a5c7dad11015c66fbb9d881bc4caa5b12f16292f857842d9d1871595f4495"}, - {file = "coverage-7.2.7-cp310-cp310-win32.whl", hash = "sha256:ee57190f24fba796e36bb6d3aa8a8783c643d8fa9760c89f7a98ab5455fbf818"}, - {file = "coverage-7.2.7-cp310-cp310-win_amd64.whl", hash = "sha256:f75f7168ab25dd93110c8a8117a22450c19976afbc44234cbf71481094c1b850"}, - {file = "coverage-7.2.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:06a9a2be0b5b576c3f18f1a241f0473575c4a26021b52b2a85263a00f034d51f"}, - {file = "coverage-7.2.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5baa06420f837184130752b7c5ea0808762083bf3487b5038d68b012e5937dbe"}, - {file = "coverage-7.2.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdec9e8cbf13a5bf63290fc6013d216a4c7232efb51548594ca3631a7f13c3a3"}, - {file = "coverage-7.2.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:52edc1a60c0d34afa421c9c37078817b2e67a392cab17d97283b64c5833f427f"}, - {file = "coverage-7.2.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63426706118b7f5cf6bb6c895dc215d8a418d5952544042c8a2d9fe87fcf09cb"}, - {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:afb17f84d56068a7c29f5fa37bfd38d5aba69e3304af08ee94da8ed5b0865833"}, - {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:48c19d2159d433ccc99e729ceae7d5293fbffa0bdb94952d3579983d1c8c9d97"}, - {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0e1f928eaf5469c11e886fe0885ad2bf1ec606434e79842a879277895a50942a"}, - {file = "coverage-7.2.7-cp311-cp311-win32.whl", hash = "sha256:33d6d3ea29d5b3a1a632b3c4e4f4ecae24ef170b0b9ee493883f2df10039959a"}, - {file = "coverage-7.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:5b7540161790b2f28143191f5f8ec02fb132660ff175b7747b95dcb77ac26562"}, - {file = "coverage-7.2.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f2f67fe12b22cd130d34d0ef79206061bfb5eda52feb6ce0dba0644e20a03cf4"}, - {file = "coverage-7.2.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a342242fe22407f3c17f4b499276a02b01e80f861f1682ad1d95b04018e0c0d4"}, - {file = "coverage-7.2.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:171717c7cb6b453aebac9a2ef603699da237f341b38eebfee9be75d27dc38e01"}, - {file = "coverage-7.2.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49969a9f7ffa086d973d91cec8d2e31080436ef0fb4a359cae927e742abfaaa6"}, - {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b46517c02ccd08092f4fa99f24c3b83d8f92f739b4657b0f146246a0ca6a831d"}, - {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:a3d33a6b3eae87ceaefa91ffdc130b5e8536182cd6dfdbfc1aa56b46ff8c86de"}, - {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:976b9c42fb2a43ebf304fa7d4a310e5f16cc99992f33eced91ef6f908bd8f33d"}, - {file = "coverage-7.2.7-cp312-cp312-win32.whl", hash = "sha256:8de8bb0e5ad103888d65abef8bca41ab93721647590a3f740100cd65c3b00511"}, - {file = "coverage-7.2.7-cp312-cp312-win_amd64.whl", hash = "sha256:9e31cb64d7de6b6f09702bb27c02d1904b3aebfca610c12772452c4e6c21a0d3"}, - {file = "coverage-7.2.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:58c2ccc2f00ecb51253cbe5d8d7122a34590fac9646a960d1430d5b15321d95f"}, - {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d22656368f0e6189e24722214ed8d66b8022db19d182927b9a248a2a8a2f67eb"}, - {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a895fcc7b15c3fc72beb43cdcbdf0ddb7d2ebc959edac9cef390b0d14f39f8a9"}, - {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e84606b74eb7de6ff581a7915e2dab7a28a0517fbe1c9239eb227e1354064dcd"}, - {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0a5f9e1dbd7fbe30196578ca36f3fba75376fb99888c395c5880b355e2875f8a"}, - {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:419bfd2caae268623dd469eff96d510a920c90928b60f2073d79f8fe2bbc5959"}, - {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2aee274c46590717f38ae5e4650988d1af340fe06167546cc32fe2f58ed05b02"}, - {file = "coverage-7.2.7-cp37-cp37m-win32.whl", hash = "sha256:61b9a528fb348373c433e8966535074b802c7a5d7f23c4f421e6c6e2f1697a6f"}, - {file = "coverage-7.2.7-cp37-cp37m-win_amd64.whl", hash = "sha256:b1c546aca0ca4d028901d825015dc8e4d56aac4b541877690eb76490f1dc8ed0"}, - {file = "coverage-7.2.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:54b896376ab563bd38453cecb813c295cf347cf5906e8b41d340b0321a5433e5"}, - {file = "coverage-7.2.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3d376df58cc111dc8e21e3b6e24606b5bb5dee6024f46a5abca99124b2229ef5"}, - {file = "coverage-7.2.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e330fc79bd7207e46c7d7fd2bb4af2963f5f635703925543a70b99574b0fea9"}, - {file = "coverage-7.2.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e9d683426464e4a252bf70c3498756055016f99ddaec3774bf368e76bbe02b6"}, - {file = "coverage-7.2.7-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d13c64ee2d33eccf7437961b6ea7ad8673e2be040b4f7fd4fd4d4d28d9ccb1e"}, - {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b7aa5f8a41217360e600da646004f878250a0d6738bcdc11a0a39928d7dc2050"}, - {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8fa03bce9bfbeeef9f3b160a8bed39a221d82308b4152b27d82d8daa7041fee5"}, - {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:245167dd26180ab4c91d5e1496a30be4cd721a5cf2abf52974f965f10f11419f"}, - {file = "coverage-7.2.7-cp38-cp38-win32.whl", hash = "sha256:d2c2db7fd82e9b72937969bceac4d6ca89660db0a0967614ce2481e81a0b771e"}, - {file = "coverage-7.2.7-cp38-cp38-win_amd64.whl", hash = "sha256:2e07b54284e381531c87f785f613b833569c14ecacdcb85d56b25c4622c16c3c"}, - {file = "coverage-7.2.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:537891ae8ce59ef63d0123f7ac9e2ae0fc8b72c7ccbe5296fec45fd68967b6c9"}, - {file = "coverage-7.2.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:06fb182e69f33f6cd1d39a6c597294cff3143554b64b9825d1dc69d18cc2fff2"}, - {file = "coverage-7.2.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:201e7389591af40950a6480bd9edfa8ed04346ff80002cec1a66cac4549c1ad7"}, - {file = "coverage-7.2.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f6951407391b639504e3b3be51b7ba5f3528adbf1a8ac3302b687ecababf929e"}, - {file = "coverage-7.2.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f48351d66575f535669306aa7d6d6f71bc43372473b54a832222803eb956fd1"}, - {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b29019c76039dc3c0fd815c41392a044ce555d9bcdd38b0fb60fb4cd8e475ba9"}, - {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:81c13a1fc7468c40f13420732805a4c38a105d89848b7c10af65a90beff25250"}, - {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:975d70ab7e3c80a3fe86001d8751f6778905ec723f5b110aed1e450da9d4b7f2"}, - {file = "coverage-7.2.7-cp39-cp39-win32.whl", hash = "sha256:7ee7d9d4822c8acc74a5e26c50604dff824710bc8de424904c0982e25c39c6cb"}, - {file = "coverage-7.2.7-cp39-cp39-win_amd64.whl", hash = "sha256:eb393e5ebc85245347950143969b241d08b52b88a3dc39479822e073a1a8eb27"}, - {file = "coverage-7.2.7-pp37.pp38.pp39-none-any.whl", hash = "sha256:b7b4c971f05e6ae490fef852c218b0e79d4e52f79ef0c8475566584a8fb3e01d"}, - {file = "coverage-7.2.7.tar.gz", hash = "sha256:924d94291ca674905fe9481f12294eb11f2d3d3fd1adb20314ba89e94f44ed59"}, + {file = "coverage-7.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:db76a1bcb51f02b2007adacbed4c88b6dee75342c37b05d1822815eed19edee5"}, + {file = "coverage-7.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c02cfa6c36144ab334d556989406837336c1d05215a9bdf44c0bc1d1ac1cb637"}, + {file = "coverage-7.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:477c9430ad5d1b80b07f3c12f7120eef40bfbf849e9e7859e53b9c93b922d2af"}, + {file = "coverage-7.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce2ee86ca75f9f96072295c5ebb4ef2a43cecf2870b0ca5e7a1cbdd929cf67e1"}, + {file = "coverage-7.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68d8a0426b49c053013e631c0cdc09b952d857efa8f68121746b339912d27a12"}, + {file = "coverage-7.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b3eb0c93e2ea6445b2173da48cb548364f8f65bf68f3d090404080d338e3a689"}, + {file = "coverage-7.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:90b6e2f0f66750c5a1178ffa9370dec6c508a8ca5265c42fbad3ccac210a7977"}, + {file = "coverage-7.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:96d7d761aea65b291a98c84e1250cd57b5b51726821a6f2f8df65db89363be51"}, + {file = "coverage-7.3.0-cp310-cp310-win32.whl", hash = "sha256:63c5b8ecbc3b3d5eb3a9d873dec60afc0cd5ff9d9f1c75981d8c31cfe4df8527"}, + {file = "coverage-7.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:97c44f4ee13bce914272589b6b41165bbb650e48fdb7bd5493a38bde8de730a1"}, + {file = "coverage-7.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:74c160285f2dfe0acf0f72d425f3e970b21b6de04157fc65adc9fd07ee44177f"}, + {file = "coverage-7.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b543302a3707245d454fc49b8ecd2c2d5982b50eb63f3535244fd79a4be0c99d"}, + {file = "coverage-7.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad0f87826c4ebd3ef484502e79b39614e9c03a5d1510cfb623f4a4a051edc6fd"}, + {file = "coverage-7.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:13c6cbbd5f31211d8fdb477f0f7b03438591bdd077054076eec362cf2207b4a7"}, + {file = "coverage-7.3.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fac440c43e9b479d1241fe9d768645e7ccec3fb65dc3a5f6e90675e75c3f3e3a"}, + {file = "coverage-7.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:3c9834d5e3df9d2aba0275c9f67989c590e05732439b3318fa37a725dff51e74"}, + {file = "coverage-7.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4c8e31cf29b60859876474034a83f59a14381af50cbe8a9dbaadbf70adc4b214"}, + {file = "coverage-7.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7a9baf8e230f9621f8e1d00c580394a0aa328fdac0df2b3f8384387c44083c0f"}, + {file = "coverage-7.3.0-cp311-cp311-win32.whl", hash = "sha256:ccc51713b5581e12f93ccb9c5e39e8b5d4b16776d584c0f5e9e4e63381356482"}, + {file = "coverage-7.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:887665f00ea4e488501ba755a0e3c2cfd6278e846ada3185f42d391ef95e7e70"}, + {file = "coverage-7.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d000a739f9feed900381605a12a61f7aaced6beae832719ae0d15058a1e81c1b"}, + {file = "coverage-7.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:59777652e245bb1e300e620ce2bef0d341945842e4eb888c23a7f1d9e143c446"}, + {file = "coverage-7.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9737bc49a9255d78da085fa04f628a310c2332b187cd49b958b0e494c125071"}, + {file = "coverage-7.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5247bab12f84a1d608213b96b8af0cbb30d090d705b6663ad794c2f2a5e5b9fe"}, + {file = "coverage-7.3.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2ac9a1de294773b9fa77447ab7e529cf4fe3910f6a0832816e5f3d538cfea9a"}, + {file = "coverage-7.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:85b7335c22455ec12444cec0d600533a238d6439d8d709d545158c1208483873"}, + {file = "coverage-7.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:36ce5d43a072a036f287029a55b5c6a0e9bd73db58961a273b6dc11a2c6eb9c2"}, + {file = "coverage-7.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:211a4576e984f96d9fce61766ffaed0115d5dab1419e4f63d6992b480c2bd60b"}, + {file = "coverage-7.3.0-cp312-cp312-win32.whl", hash = "sha256:56afbf41fa4a7b27f6635bc4289050ac3ab7951b8a821bca46f5b024500e6321"}, + {file = "coverage-7.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:7f297e0c1ae55300ff688568b04ff26b01c13dfbf4c9d2b7d0cb688ac60df479"}, + {file = "coverage-7.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac0dec90e7de0087d3d95fa0533e1d2d722dcc008bc7b60e1143402a04c117c1"}, + {file = "coverage-7.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:438856d3f8f1e27f8e79b5410ae56650732a0dcfa94e756df88c7e2d24851fcd"}, + {file = "coverage-7.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1084393c6bda8875c05e04fce5cfe1301a425f758eb012f010eab586f1f3905e"}, + {file = "coverage-7.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49ab200acf891e3dde19e5aa4b0f35d12d8b4bd805dc0be8792270c71bd56c54"}, + {file = "coverage-7.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a67e6bbe756ed458646e1ef2b0778591ed4d1fcd4b146fc3ba2feb1a7afd4254"}, + {file = "coverage-7.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f39c49faf5344af36042b293ce05c0d9004270d811c7080610b3e713251c9b0"}, + {file = "coverage-7.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7df91fb24c2edaabec4e0eee512ff3bc6ec20eb8dccac2e77001c1fe516c0c84"}, + {file = "coverage-7.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:34f9f0763d5fa3035a315b69b428fe9c34d4fc2f615262d6be3d3bf3882fb985"}, + {file = "coverage-7.3.0-cp38-cp38-win32.whl", hash = "sha256:bac329371d4c0d456e8d5f38a9b0816b446581b5f278474e416ea0c68c47dcd9"}, + {file = "coverage-7.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:b859128a093f135b556b4765658d5d2e758e1fae3e7cc2f8c10f26fe7005e543"}, + {file = "coverage-7.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fc0ed8d310afe013db1eedd37176d0839dc66c96bcfcce8f6607a73ffea2d6ba"}, + {file = "coverage-7.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61260ec93f99f2c2d93d264b564ba912bec502f679793c56f678ba5251f0393"}, + {file = "coverage-7.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97af9554a799bd7c58c0179cc8dbf14aa7ab50e1fd5fa73f90b9b7215874ba28"}, + {file = "coverage-7.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3558e5b574d62f9c46b76120a5c7c16c4612dc2644c3d48a9f4064a705eaee95"}, + {file = "coverage-7.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37d5576d35fcb765fca05654f66aa71e2808d4237d026e64ac8b397ffa66a56a"}, + {file = "coverage-7.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:07ea61bcb179f8f05ffd804d2732b09d23a1238642bf7e51dad62082b5019b34"}, + {file = "coverage-7.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:80501d1b2270d7e8daf1b64b895745c3e234289e00d5f0e30923e706f110334e"}, + {file = "coverage-7.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4eddd3153d02204f22aef0825409091a91bf2a20bce06fe0f638f5c19a85de54"}, + {file = "coverage-7.3.0-cp39-cp39-win32.whl", hash = "sha256:2d22172f938455c156e9af2612650f26cceea47dc86ca048fa4e0b2d21646ad3"}, + {file = "coverage-7.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:60f64e2007c9144375dd0f480a54d6070f00bb1a28f65c408370544091c9bc9e"}, + {file = "coverage-7.3.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:5492a6ce3bdb15c6ad66cb68a0244854d9917478877a25671d70378bdc8562d0"}, + {file = "coverage-7.3.0.tar.gz", hash = "sha256:49dbb19cdcafc130f597d9e04a29d0a032ceedf729e41b181f51cd170e6ee865"}, ] [package.extras] @@ -1898,4 +1890,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "13cc67e42813b969f20197b0cd9209e0e51c00a52b0b3015bd545280f6209f0b" +content-hash = "76879d9ec5e7973b8a37364fe0fff881f857ae80eec8f02d72317c6a8deb9577" diff --git a/pyproject.toml b/pyproject.toml index b934bd2b..142b844f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ pytest-asyncio = "^0.21.1" types-beautifulsoup4 = "^4.12.0.6" pytest-md = "^0.2.0" pytest-emoji = "^0.2.0" -coverage = "^7.2.7" +coverage = "^7.3.0" pytest-cov = "^4.1.0" pytest = "^7.4.0" From b5ac337fb456f0aa81fa8c7a19e25b0c64c60bc2 Mon Sep 17 00:00:00 2001 From: Pun Butrach Date: Tue, 15 Aug 2023 08:16:47 +0700 Subject: [PATCH 04/13] refactor: correct capitalisation for GitHub (#61) Co-authored-by: Ushie --- api/backends/github.py | 34 +++++++++++++++++----------------- api/compat.py | 14 +++++++------- api/github.py | 26 +++++++++++++------------- config.py | 2 +- qodana.sarif.json | 4 ++-- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/api/backends/github.py b/api/backends/github.py index 55215260..f8e876a4 100644 --- a/api/backends/github.py +++ b/api/backends/github.py @@ -22,11 +22,11 @@ class GithubRepository(Repository): """ - A repository class that represents a Github repository. + A repository class that represents a GitHub repository. Args: - owner (str): The username of the owner of the Github repository. - name (str): The name of the Github repository. + owner (str): The username of the owner of the GitHub repository. + name (str): The name of the GitHub repository. """ def __init__(self, owner: str, name: str): @@ -34,8 +34,8 @@ def __init__(self, owner: str, name: str): Initializes a new instance of the GithubRepository class. Args: - owner (str): The username of the owner of the Github repository. - name (str): The name of the Github repository. + owner (str): The username of the owner of the GitHub repository. + name (str): The name of the GitHub repository. """ super().__init__(Github()) self.owner = owner @@ -44,18 +44,18 @@ def __init__(self, owner: str, name: str): class Github(Backend): """ - A backend class that interacts with the Github API. + A backend class that interacts with the GitHub API. Attributes: - name (str): The name of the Github backend. - base_url (str): The base URL of the Github API. - token (str): The Github access token used for authentication. - headers (dict[str, str]): The HTTP headers to be sent with each request to the Github API. + name (str): The name of the GitHub backend. + base_url (str): The base URL of the GitHub API. + token (str): The GitHub access token used for authentication. + headers (dict[str, str]): The HTTP headers to be sent with each request to the GitHub API. """ def __init__(self): """ - Initializes a new instance of the Github class. + Initializes a new instance of the GitHub class. """ super().__init__(repo_name, base_url) self.token: Optional[str] = os.getenv("GITHUB_TOKEN") @@ -121,10 +121,10 @@ async def list_releases( self, repository: GithubRepository, per_page: int = 30, page: int = 1 ) -> list[Release]: """ - Returns a list of Release objects for a given Github repository. + Returns a list of Release objects for a given GitHub repository. Args: - repository (GithubRepository): The Github repository for which to retrieve the releases. + repository (GithubRepository): The GitHub repository for which to retrieve the releases. per_page (int): The number of releases to return per page. page (int): The page number of the releases to return. @@ -148,10 +148,10 @@ async def get_release_by_tag_name( self, repository: GithubRepository, tag_name: str ) -> Release: """ - Retrieves a specific release for a given Github repository by its tag name. + Retrieves a specific release for a given GitHub repository by its tag name. Args: - repository (GithubRepository): The Github repository for which to retrieve the release. + repository (GithubRepository): The GitHub repository for which to retrieve the release. tag_name (str): The tag name of the release to retrieve. Returns: @@ -171,7 +171,7 @@ async def get_latest_release( """Get the latest release for a given repository. Args: - repository (GithubRepository): The Github repository for which to retrieve the release. + repository (GithubRepository): The GitHub repository for which to retrieve the release. Returns: Release: The latest release for the given repository. @@ -190,7 +190,7 @@ async def get_latest_pre_release( """Get the latest pre-release for a given repository. Args: - repository (GithubRepository): The Github repository for which to retrieve the release. + repository (GithubRepository): The GitHub repository for which to retrieve the release. Returns: Release: The latest pre-release for the given repository. diff --git a/api/compat.py b/api/compat.py index 6635209b..8d592def 100644 --- a/api/compat.py +++ b/api/compat.py @@ -2,10 +2,10 @@ This module provides endpoints for compatibility with the old API. Routes: - - GET //releases: Retrieve a list of releases for a Github repository. - - GET //releases/latest: Retrieve the latest release for a Github repository. - - GET //releases/tag/: Retrieve a specific release for a Github repository by its tag name. - - GET //contributors: Retrieve a list of contributors for a Github repository. + - GET //releases: Retrieve a list of releases for a GitHub repository. + - GET //releases/latest: Retrieve the latest release for a GitHub repository. + - GET //releases/tag/: Retrieve a specific release for a GitHub repository by its tag name. + - GET //contributors: Retrieve a list of contributors for a GitHub repository. - GET /patches/: Retrieve a list of patches for a given release tag. """ @@ -31,10 +31,10 @@ ) async def tools(request: Request) -> JSONResponse: """ - Retrieve a list of releases for a Github repository. + Retrieve a list of releases for a GitHub repository. **Args:** - - repo (str): The name of the Github repository to retrieve releases for. + - repo (str): The name of the GitHub repository to retrieve releases for. **Query Parameters:** - per_page (int): The number of releases to retrieve per page. @@ -67,7 +67,7 @@ async def tools(request: Request) -> JSONResponse: ) async def contributors(request: Request) -> JSONResponse: """ - Retrieve a list of releases for a Github repository. + Retrieve a list of releases for a GitHub repository. **Returns:** - JSONResponse: A Sanic JSONResponse object containing the list of releases. diff --git a/api/github.py b/api/github.py index 4f878a73..8d76dead 100644 --- a/api/github.py +++ b/api/github.py @@ -1,11 +1,11 @@ """ -This module provides endpoints for interacting with the Github API. +This module provides endpoints for interacting with the GitHub API. Routes: - - GET //releases: Retrieve a list of releases for a Github repository. - - GET //releases/latest: Retrieve the latest release for a Github repository. - - GET //releases/tag/: Retrieve a specific release for a Github repository by its tag name. - - GET //contributors: Retrieve a list of contributors for a Github repository. + - GET //releases: Retrieve a list of releases for a GitHub repository. + - GET //releases/latest: Retrieve the latest release for a GitHub repository. + - GET //releases/tag/: Retrieve a specific release for a GitHub repository by its tag name. + - GET //contributors: Retrieve a list of contributors for a GitHub repository. - GET /patches/: Retrieve a list of patches for a given release tag. """ @@ -30,10 +30,10 @@ ) async def list_releases(request: Request, repo: str) -> JSONResponse: """ - Retrieve a list of releases for a Github repository. + Retrieve a list of releases for a GitHub repository. **Args:** - - repo (str): The name of the Github repository to retrieve releases for. + - repo (str): The name of the GitHub repository to retrieve releases for. **Query Parameters:** - per_page (int): The number of releases to retrieve per page. @@ -67,10 +67,10 @@ async def list_releases(request: Request, repo: str) -> JSONResponse: ) async def latest_release(request: Request, repo: str) -> JSONResponse: """ - Retrieve the latest release for a Github repository. + Retrieve the latest release for a GitHub repository. **Args:** - - repo (str): The name of the Github repository to retrieve the release for. + - repo (str): The name of the GitHub repository to retrieve the release for. **Query Parameters:** - dev (bool): Whether or not to retrieve the latest development release. @@ -103,17 +103,17 @@ async def latest_release(request: Request, repo: str) -> JSONResponse: @github.get("//releases/tag/") @openapi.definition( - summary="Retrieve a release for a Github repository by its tag name.", + summary="Retrieve a release for a GitHub repository by its tag name.", response=SingleReleaseResponseModel, ) async def get_release_by_tag_name( request: Request, repo: str, tag: str ) -> JSONResponse: """ - Retrieve a release for a Github repository by its tag name. + Retrieve a release for a GitHub repository by its tag name. **Args:** - - repo (str): The name of the Github repository to retrieve the release for. + - repo (str): The name of the GitHub repository to retrieve the release for. - tag (str): The tag for the release to be retrieved. **Returns:** @@ -142,7 +142,7 @@ async def get_contributors(request: Request, repo: str) -> JSONResponse: Retrieve a list of contributors for a repository. **Args:** - - repo (str): The name of the Github repository to retrieve the contributors for. + - repo (str): The name of the GitHub repository to retrieve the contributors for. **Returns:** - JSONResponse: A Sanic JSONResponse object containing the list of contributors. diff --git a/config.py b/config.py index 345aa028..4b922b56 100644 --- a/config.py +++ b/config.py @@ -52,7 +52,7 @@ "preferred": True, }, { - "name": "Github Sponsors", + "name": "GitHub Sponsors", "url": "https://github.com/sponsors/ReVanced", "preferred": False, }, diff --git a/qodana.sarif.json b/qodana.sarif.json index 5e516ce3..71fb81e1 100644 --- a/qodana.sarif.json +++ b/qodana.sarif.json @@ -11288,7 +11288,7 @@ "charOffset": 0, "charLength": 72, "snippet": { - "text": "\"\"\"\nThis module provides endpoints for interacting with the Github API.\n" + "text": "\"\"\"\nThis module provides endpoints for interacting with the GitHub API.\n" }, "sourceLanguage": "Python" }, @@ -11298,7 +11298,7 @@ "charOffset": 0, "charLength": 165, "snippet": { - "text": "\"\"\"\nThis module provides endpoints for interacting with the Github API.\n\nRoutes:\n - GET //releases: Retrieve a list of releases for a Github repository." + "text": "\"\"\"\nThis module provides endpoints for interacting with the GitHub API.\n\nRoutes:\n - GET //releases: Retrieve a list of releases for a GitHub repository." } } }, From 9bbd056c1bc6a30059a8ed0a47823c228531e4c0 Mon Sep 17 00:00:00 2001 From: Ushie Date: Sat, 19 Aug 2023 22:35:09 +0300 Subject: [PATCH 05/13] feat: info endpoint (#71) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- api/__init__.py | 3 +- api/info.py | 31 ++++++++++ api/models/info.py | 23 ++++++++ api/models/socials.py | 4 +- config.py | 131 +++++++++++++++++++++++------------------- 5 files changed, 129 insertions(+), 63 deletions(-) create mode 100644 api/info.py create mode 100644 api/models/info.py diff --git a/api/__init__.py b/api/__init__.py index d84b20a5..0967429f 100644 --- a/api/__init__.py +++ b/api/__init__.py @@ -4,7 +4,8 @@ from api.github import github from api.ping import ping from api.socials import socials +from api.info import info from api.compat import github as old from api.donations import donations -api = Blueprint.group(ping, github, socials, donations, old, url_prefix="/") +api = Blueprint.group(ping, github, info, socials, donations, old, url_prefix="/") diff --git a/api/info.py b/api/info.py new file mode 100644 index 00000000..18b83752 --- /dev/null +++ b/api/info.py @@ -0,0 +1,31 @@ +""" +This module provides a blueprint for the info endpoint. + +Routes: + - GET /info: Get info about the owner of the API. +""" + +from sanic import Blueprint, Request +from sanic.response import JSONResponse, json +from sanic_ext import openapi + +from api.models.info import InfoResponseModel +from config import api_version, default_info + +info: Blueprint = Blueprint("info", version=api_version) + + +@info.get("/info") +@openapi.definition( + summary="Information about the API", + response=[InfoResponseModel], +) +async def root(request: Request) -> JSONResponse: + """ + Returns a JSONResponse with a dictionary containing info about the owner of the API. + + **Returns:** + - JSONResponse: A Sanic JSONResponse instance containing a dictionary with the info about the owner of the API. + """ + data: dict[str, dict] = {"info": default_info} + return json(data, status=200) diff --git a/api/models/info.py b/api/models/info.py new file mode 100644 index 00000000..d1f3681d --- /dev/null +++ b/api/models/info.py @@ -0,0 +1,23 @@ +from api.models.donations import DonationFields +from api.models.socials import SocialFields +from pydantic import BaseModel + + +class InfoFields(BaseModel): + """ + Implements the fields for a API owner info. + """ + + name: str + about: str + contact: dict[str, str] + socials: SocialFields + donations: DonationFields + + +class InfoResponseModel(BaseModel): + """ + A Pydantic BaseModel that represents a dictionary of info. + """ + + info: InfoFields diff --git a/api/models/socials.py b/api/models/socials.py index 0b43821e..1a0929f9 100644 --- a/api/models/socials.py +++ b/api/models/socials.py @@ -1,7 +1,7 @@ from pydantic import BaseModel -class SocialField(BaseModel): +class SocialFields(BaseModel): """ Implements the fields for a social network link. """ @@ -15,7 +15,7 @@ class SocialsResponseModel(BaseModel): A Pydantic BaseModel that represents a dictionary of social links. """ - socials: list[SocialField] + socials: list[SocialFields] """ A dictionary where the keys are the names of the social networks, and the values are the links to the profiles or pages. diff --git a/config.py b/config.py index 4b922b56..ffea30c0 100644 --- a/config.py +++ b/config.py @@ -1,13 +1,68 @@ +# API Configuration + +backend: str = "github" +redis: dict[str, str | int] = {"host": "localhost", "port": 6379} + +# GitHub Backend Configuration + +owner: str = "ReVanced" +default_repository: str = ".github" + +# API Versioning + +api_version: str = "v2" +openapi_version: str = "2.0.0" +openapi_title: str = "ReVanced API" +openapi_description: str = """ +## The official JSON API for ReVanced Releases 🚀 + +### Links + +- [Changelogs](https://github.com/revanced/) +- [Official links to ReVanced](https://revanced.app) + +### Important Information + +* Rate Limiting - 60 requests per minute +* Cache - 5 minutes + +### Additional Notes + +1. Breaking changes are to be expected +2. Client side caching is advised to avoid unnecessary requests +3. Abuse of the API will result in IP blocks +""" + +# Testing Configuration + +github_testing_repository: str = "revanced-patches" +github_testing_tag: str = "v2.173.0" +apkdl_testing_package: str = "com.google.android.youtube" + +# Old API Configuration + +compat_api_version: str = "v1" +compat_repositories: list = [ + "revanced-patcher", + "revanced-patches", + "revanced-integrations", + "revanced-manager", + "revanced-cli", + "revanced-website", + "revanced-api", + "revanced-releases-api", +] + # Social Links social_links: list[dict[str, str]] = [ - {"name": "website", "url": "https://revanced.app"}, - {"name": "github", "url": "https://github.com/revanced"}, - {"name": "twitter", "url": "https://twitter.com/revancedapp"}, - {"name": "discord", "url": "https://revanced.app/discord"}, - {"name": "reddit", "url": "https://www.reddit.com/r/revancedapp"}, - {"name": "telegram", "url": "https://t.me/app_revanced"}, - {"name": "youtube", "url": "https://www.youtube.com/@ReVanced"}, + {"name": "Website", "url": "https://revanced.app"}, + {"name": "GitHub", "url": "https://github.com/revanced"}, + {"name": "Twitter", "url": "https://twitter.com/revancedapp"}, + {"name": "Discord", "url": "https://revanced.app/discord"}, + {"name": "Reddit", "url": "https://www.reddit.com/r/revancedapp"}, + {"name": "Telegram", "url": "https://t.me/app_revanced"}, + {"name": "YouTube", "url": "https://www.youtube.com/@ReVanced"}, ] # Donation info @@ -58,56 +113,12 @@ }, ] -# API Configuration - -backend: str = "github" -redis: dict[str, str | int] = {"host": "localhost", "port": 6379} - -# GitHub Backend Configuration - -owner: str = "revanced" -default_repository: str = ".github" - -# API Versioning - -api_version: str = "v2" -openapi_version: str = "2.0.0" -openapi_title: str = "ReVanced API" -openapi_description: str = """ -## The official JSON API for ReVanced Releases 🚀 - -### Links - -- [Changelogs](https://github.com/revanced/) -- [Official links to ReVanced](https://revanced.app) - -### Important Information - -* Rate Limiting - 60 requests per minute -* Cache - 5 minutes - -### Additional Notes - -1. Breaking changes are to be expected -2. Client side caching is advised to avoid unnecessary requests -3. Abuse of the API will result in IP blocks -""" - -# Testing Configuration - -github_testing_repository: str = "revanced-patches" -github_testing_tag: str = "v2.173.0" -apkdl_testing_package: str = "com.google.android.youtube" - -# Old API Configuration - -compat_api_version: str = "v1" -compat_repositories: list = [ - "revanced-patcher", - "revanced-patches", - "revanced-integrations", - "revanced-manager", - "revanced-cli", - "revanced-website", - "revanced-releases-api", -] +default_info: dict[str, str | list[str | bool] | bool] = { + "name": owner, + "about": "ReVanced was born out of Vanced's discontinuation and it is our goal to continue the legacy of what Vanced left behind. Thanks to ReVanced Patcher, it's possible to create long-lasting patches for nearly any Android app. ReVanced's patching system is designed to allow patches to work on new versions of the apps automatically with bare minimum maintenance.", + "contact": [ + {"method": "mail", "value": "contact@revanced.app"}, + ], + "socials": social_links, + "donations": {"wallets": wallets, "links": links}, +} From d53b95b4f25cbf0e86852aa427ba99250e0900f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 19 Aug 2023 22:43:39 +0300 Subject: [PATCH 06/13] chore(deps): bump mypy from 1.5.0 to 1.5.1 (#65) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 53 +++++++++++++++++++++++++++----------------------- pyproject.toml | 2 +- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/poetry.lock b/poetry.lock index 188b46e8..4b4507be 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1073,33 +1073,38 @@ files = [ [[package]] name = "mypy" -version = "1.5.0" +version = "1.5.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ad3109bec37cc33654de8db30fe8ff3a1bb57ea65144167d68185e6dced9868d"}, - {file = "mypy-1.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b4ea3a0241cb005b0ccdbd318fb99619b21ae51bcf1660b95fc22e0e7d3ba4a1"}, - {file = "mypy-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1fe816e26e676c1311b9e04fd576543b873576d39439f7c24c8e5c7728391ecf"}, - {file = "mypy-1.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:42170e68adb1603ccdc55a30068f72bcfcde2ce650188e4c1b2a93018b826735"}, - {file = "mypy-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:d145b81a8214687cfc1f85c03663a5bbe736777410e5580e54d526e7e904f564"}, - {file = "mypy-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c36011320e452eb30bec38b9fd3ba20569dc9545d7d4540d967f3ea1fab9c374"}, - {file = "mypy-1.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f3940cf5845b2512b3ab95463198b0cdf87975dfd17fdcc6ce9709a9abe09e69"}, - {file = "mypy-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9166186c498170e1ff478a7f540846b2169243feb95bc228d39a67a1a450cdc6"}, - {file = "mypy-1.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:725b57a19b7408ef66a0fd9db59b5d3e528922250fb56e50bded27fea9ff28f0"}, - {file = "mypy-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:eec5c927aa4b3e8b4781840f1550079969926d0a22ce38075f6cfcf4b13e3eb4"}, - {file = "mypy-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:79c520aa24f21852206b5ff2cf746dc13020113aa73fa55af504635a96e62718"}, - {file = "mypy-1.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:769ddb6bfe55c2bd9c7d6d7020885a5ea14289619db7ee650e06b1ef0852c6f4"}, - {file = "mypy-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbf18f8db7e5f060d61c91e334d3b96d6bb624ddc9ee8a1cde407b737acbca2c"}, - {file = "mypy-1.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a2500ad063413bc873ae102cf655bf49889e0763b260a3a7cf544a0cbbf7e70a"}, - {file = "mypy-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:84cf9f7d8a8a22bb6a36444480f4cbf089c917a4179fbf7eea003ea931944a7f"}, - {file = "mypy-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a551ed0fc02455fe2c1fb0145160df8336b90ab80224739627b15ebe2b45e9dc"}, - {file = "mypy-1.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:372fd97293ed0076d52695849f59acbbb8461c4ab447858cdaeaf734a396d823"}, - {file = "mypy-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8a7444d6fcac7e2585b10abb91ad900a576da7af8f5cffffbff6065d9115813"}, - {file = "mypy-1.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:35b13335c6c46a386577a51f3d38b2b5d14aa619e9633bb756bd77205e4bd09f"}, - {file = "mypy-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:2c9d570f53908cbea326ad8f96028a673b814d9dca7515bf71d95fa662c3eb6f"}, - {file = "mypy-1.5.0-py3-none-any.whl", hash = "sha256:69b32d0dedd211b80f1b7435644e1ef83033a2af2ac65adcdc87c38db68a86be"}, - {file = "mypy-1.5.0.tar.gz", hash = "sha256:f3460f34b3839b9bc84ee3ed65076eb827cd99ed13ed08d723f9083cada4a212"}, + {file = "mypy-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f33592ddf9655a4894aef22d134de7393e95fcbdc2d15c1ab65828eee5c66c70"}, + {file = "mypy-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:258b22210a4a258ccd077426c7a181d789d1121aca6db73a83f79372f5569ae0"}, + {file = "mypy-1.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9ec1f695f0c25986e6f7f8778e5ce61659063268836a38c951200c57479cc12"}, + {file = "mypy-1.5.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:abed92d9c8f08643c7d831300b739562b0a6c9fcb028d211134fc9ab20ccad5d"}, + {file = "mypy-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:a156e6390944c265eb56afa67c74c0636f10283429171018446b732f1a05af25"}, + {file = "mypy-1.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6ac9c21bfe7bc9f7f1b6fae441746e6a106e48fc9de530dea29e8cd37a2c0cc4"}, + {file = "mypy-1.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:51cb1323064b1099e177098cb939eab2da42fea5d818d40113957ec954fc85f4"}, + {file = "mypy-1.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:596fae69f2bfcb7305808c75c00f81fe2829b6236eadda536f00610ac5ec2243"}, + {file = "mypy-1.5.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:32cb59609b0534f0bd67faebb6e022fe534bdb0e2ecab4290d683d248be1b275"}, + {file = "mypy-1.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:159aa9acb16086b79bbb0016145034a1a05360626046a929f84579ce1666b315"}, + {file = "mypy-1.5.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f6b0e77db9ff4fda74de7df13f30016a0a663928d669c9f2c057048ba44f09bb"}, + {file = "mypy-1.5.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:26f71b535dfc158a71264e6dc805a9f8d2e60b67215ca0bfa26e2e1aa4d4d373"}, + {file = "mypy-1.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fc3a600f749b1008cc75e02b6fb3d4db8dbcca2d733030fe7a3b3502902f161"}, + {file = "mypy-1.5.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:26fb32e4d4afa205b24bf645eddfbb36a1e17e995c5c99d6d00edb24b693406a"}, + {file = "mypy-1.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:82cb6193de9bbb3844bab4c7cf80e6227d5225cc7625b068a06d005d861ad5f1"}, + {file = "mypy-1.5.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4a465ea2ca12804d5b34bb056be3a29dc47aea5973b892d0417c6a10a40b2d65"}, + {file = "mypy-1.5.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9fece120dbb041771a63eb95e4896791386fe287fefb2837258925b8326d6160"}, + {file = "mypy-1.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d28ddc3e3dfeab553e743e532fb95b4e6afad51d4706dd22f28e1e5e664828d2"}, + {file = "mypy-1.5.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:57b10c56016adce71fba6bc6e9fd45d8083f74361f629390c556738565af8eeb"}, + {file = "mypy-1.5.1-cp38-cp38-win_amd64.whl", hash = "sha256:ff0cedc84184115202475bbb46dd99f8dcb87fe24d5d0ddfc0fe6b8575c88d2f"}, + {file = "mypy-1.5.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8f772942d372c8cbac575be99f9cc9d9fb3bd95c8bc2de6c01411e2c84ebca8a"}, + {file = "mypy-1.5.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5d627124700b92b6bbaa99f27cbe615c8ea7b3402960f6372ea7d65faf376c14"}, + {file = "mypy-1.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:361da43c4f5a96173220eb53340ace68cda81845cd88218f8862dfb0adc8cddb"}, + {file = "mypy-1.5.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:330857f9507c24de5c5724235e66858f8364a0693894342485e543f5b07c8693"}, + {file = "mypy-1.5.1-cp39-cp39-win_amd64.whl", hash = "sha256:c543214ffdd422623e9fedd0869166c2f16affe4ba37463975043ef7d2ea8770"}, + {file = "mypy-1.5.1-py3-none-any.whl", hash = "sha256:f757063a83970d67c444f6e01d9550a7402322af3557ce7630d3c957386fa8f5"}, + {file = "mypy-1.5.1.tar.gz", hash = "sha256:b031b9601f1060bf1281feab89697324726ba0c0bae9d7cd7ab4b690940f0b92"}, ] [package.dependencies] @@ -1890,4 +1895,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "76879d9ec5e7973b8a37364fe0fff881f857ae80eec8f02d72317c6a8deb9577" +content-hash = "e9e573b758aee314a2e310bd2d6ae47bbaa85f54ca1e31773d92dcc6247d53cc" diff --git a/pyproject.toml b/pyproject.toml index 142b844f..387beb28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ cytoolz = "^0.12.2" beautifulsoup4 = "^4.12.2" setuptools = "^68.0.0" lxml = "^4.9.3" -mypy = "^1.5.0" +mypy = "^1.5.1" types-ujson = "^5.8.0.1" types-aiofiles = "^23.1.0.5" sanic-testing = "^23.6.0" From 84f3b3d57fa3c29b98b96df641a448800f51b4e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 19 Aug 2023 22:45:25 +0300 Subject: [PATCH 07/13] chore(deps): bump types-aiofiles from 23.1.0.5 to 23.2.0.0 (#66) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4b4507be..8eb12dd7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1556,13 +1556,13 @@ html5tagger = ">=1.2.1" [[package]] name = "types-aiofiles" -version = "23.1.0.5" +version = "23.2.0.0" description = "Typing stubs for aiofiles" optional = false python-versions = "*" files = [ - {file = "types-aiofiles-23.1.0.5.tar.gz", hash = "sha256:8acf2c847eb474a1397e88ac6e981484c5211715ceba1b41f6431cdc95094e7d"}, - {file = "types_aiofiles-23.1.0.5-py3-none-any.whl", hash = "sha256:4106aa867fb8d3ded9b21ca4a9dbe3f8580f756cf90973d2b863f2cbb9c29995"}, + {file = "types-aiofiles-23.2.0.0.tar.gz", hash = "sha256:b6a7127bd232e0802532837b84140b1cd5df19ee60bea3a5699720d2b583361b"}, + {file = "types_aiofiles-23.2.0.0-py3-none-any.whl", hash = "sha256:5d6719e8148cb2a9c4ea46dad86d50d3b675c46a940adca698533a8d2216d53d"}, ] [[package]] @@ -1895,4 +1895,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "e9e573b758aee314a2e310bd2d6ae47bbaa85f54ca1e31773d92dcc6247d53cc" +content-hash = "a056a292f16bc5612c6d38afb63b21f0f79ffb5fbad10aad16ada6f721ff3cab" diff --git a/pyproject.toml b/pyproject.toml index 387beb28..ee19b1eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ setuptools = "^68.0.0" lxml = "^4.9.3" mypy = "^1.5.1" types-ujson = "^5.8.0.1" -types-aiofiles = "^23.1.0.5" +types-aiofiles = "^23.2.0.0" sanic-testing = "^23.6.0" pytest-asyncio = "^0.21.1" types-beautifulsoup4 = "^4.12.0.6" From b77aa6d28225777b0b1312d6c9c0301ecb3e791d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 19 Aug 2023 22:47:58 +0300 Subject: [PATCH 08/13] chore(deps): bump setuptools from 68.0.0 to 68.1.2 (#70) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 14 +++++++------- pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8eb12dd7..6f79084a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1493,18 +1493,18 @@ httpx = ">=0.18" [[package]] name = "setuptools" -version = "68.0.0" +version = "68.1.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "setuptools-68.0.0-py3-none-any.whl", hash = "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f"}, - {file = "setuptools-68.0.0.tar.gz", hash = "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"}, + {file = "setuptools-68.1.2-py3-none-any.whl", hash = "sha256:3d8083eed2d13afc9426f227b24fd1659489ec107c0e86cec2ffdde5c92e790b"}, + {file = "setuptools-68.1.2.tar.gz", hash = "sha256:3d4dfa6d95f1b101d695a6160a7626e15583af71a5f52176efa5d39a054d475d"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5,<=7.1.2)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] @@ -1895,4 +1895,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "a056a292f16bc5612c6d38afb63b21f0f79ffb5fbad10aad16ada6f721ff3cab" +content-hash = "923013f8a05c0bc54f5d150e9b3ac22aafcdc4d7b73f0034e9d05bb7efc60381" diff --git a/pyproject.toml b/pyproject.toml index ee19b1eb..568ad445 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ asyncstdlib = "^3.10.8" pydantic = "^1.10.12" cytoolz = "^0.12.2" beautifulsoup4 = "^4.12.2" -setuptools = "^68.0.0" +setuptools = "^68.1.2" lxml = "^4.9.3" mypy = "^1.5.1" types-ujson = "^5.8.0.1" From 4425f1d3d6610a6a832871aaf8ce93e5521ff836 Mon Sep 17 00:00:00 2001 From: Ushie Date: Sat, 19 Aug 2023 22:54:53 +0300 Subject: [PATCH 09/13] chore: bump libs --- poetry.lock | 16 ++++++++-------- requirements.txt | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6f79084a..ec9e8c44 100644 --- a/poetry.lock +++ b/poetry.lock @@ -16,13 +16,13 @@ pycares = ">=4.0.0" [[package]] name = "aiofiles" -version = "23.1.0" +version = "23.2.1" description = "File support for asyncio." optional = false -python-versions = ">=3.7,<4.0" +python-versions = ">=3.7" files = [ - {file = "aiofiles-23.1.0-py3-none-any.whl", hash = "sha256:9312414ae06472eb6f1d163f555e466a23aed1c8f60c30cccf7121dba2e53eb2"}, - {file = "aiofiles-23.1.0.tar.gz", hash = "sha256:edd247df9a19e0db16534d4baaf536d6609a43e1de5401d7a4c1c148753a1635"}, + {file = "aiofiles-23.2.1-py3-none-any.whl", hash = "sha256:19297512c647d4b27a2cf7c34caa7e405c0d60b5560618a29a9fe027b18b0107"}, + {file = "aiofiles-23.2.1.tar.gz", hash = "sha256:84ec2218d8419404abcb9f0c02df3f34c6e0a68ed41072acfb1cef5cbc29051a"}, ] [[package]] @@ -171,13 +171,13 @@ trio = ["trio (<0.22)"] [[package]] name = "async-timeout" -version = "4.0.2" +version = "4.0.3" description = "Timeout context manager for asyncio programs" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, - {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, + {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, + {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, ] [[package]] diff --git a/requirements.txt b/requirements.txt index a7d6d68f..0687027d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ aiodns==3.0.0 ; python_version >= "3.11" and python_version < "4.0" -aiofiles==23.1.0 ; python_version >= "3.11" and python_version < "4.0" +aiofiles==23.2.1 ; python_version >= "3.11" and python_version < "4.0" aiohttp[speedups]==3.8.5 ; python_version >= "3.11" and python_version < "4.0" aiosignal==1.3.1 ; python_version >= "3.11" and python_version < "4.0" anyio==3.7.1 ; python_version >= "3.11" and python_version < "4.0" -async-timeout==4.0.2 ; python_version >= "3.11" and python_version < "4.0" +async-timeout==4.0.3 ; python_version >= "3.11" and python_version < "4.0" asyncstdlib==3.10.8 ; python_version >= "3.11" and python_version < "4.0" attrs==23.1.0 ; python_version >= "3.11" and python_version < "4.0" beautifulsoup4==4.12.2 ; python_version >= "3.11" and python_version < "4.0" @@ -12,8 +12,8 @@ certifi==2023.7.22 ; python_version >= "3.11" and python_version < "4.0" cffi==1.15.1 ; python_version >= "3.11" and python_version < "4.0" charset-normalizer==3.2.0 ; python_version >= "3.11" and python_version < "4.0" colorama==0.4.6 ; python_version >= "3.11" and python_version < "4.0" and sys_platform == "win32" -coverage==7.2.7 ; python_version >= "3.11" and python_version < "4.0" -coverage[toml]==7.2.7 ; python_version >= "3.11" and python_version < "4.0" +coverage==7.3.0 ; python_version >= "3.11" and python_version < "4.0" +coverage[toml]==7.3.0 ; python_version >= "3.11" and python_version < "4.0" cytoolz==0.12.2 ; python_version >= "3.11" and python_version < "4.0" frozenlist==1.4.0 ; python_version >= "3.11" and python_version < "4.0" h11==0.14.0 ; python_version >= "3.11" and python_version < "4.0" @@ -25,30 +25,30 @@ idna==3.4 ; python_version >= "3.11" and python_version < "4.0" iniconfig==2.0.0 ; python_version >= "3.11" and python_version < "4.0" lxml==4.9.3 ; python_version >= "3.11" and python_version < "4.0" multidict==6.0.4 ; python_version >= "3.11" and python_version < "4.0" -mypy==1.4.1 ; python_version >= "3.11" and python_version < "4.0" mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "4.0" +mypy==1.5.1 ; python_version >= "3.11" and python_version < "4.0" packaging==23.1 ; python_version >= "3.11" and python_version < "4.0" pluggy==1.2.0 ; python_version >= "3.11" and python_version < "4.0" pycares==4.3.0 ; python_version >= "3.11" and python_version < "4.0" pycparser==2.21 ; python_version >= "3.11" and python_version < "4.0" pydantic==1.10.12 ; python_version >= "3.11" and python_version < "4.0" -pytest==7.4.0 ; python_version >= "3.11" and python_version < "4.0" pytest-asyncio==0.21.1 ; python_version >= "3.11" and python_version < "4.0" pytest-cov==4.1.0 ; python_version >= "3.11" and python_version < "4.0" pytest-emoji==0.2.0 ; python_version >= "3.11" and python_version < "4.0" pytest-md==0.2.0 ; python_version >= "3.11" and python_version < "4.0" +pytest==7.4.0 ; python_version >= "3.11" and python_version < "4.0" pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "4.0" sanic-ext==23.6.0 ; python_version >= "3.11" and python_version < "4.0" sanic-routing==23.6.0 ; python_version >= "3.11" and python_version < "4.0" sanic-testing==23.6.0 ; python_version >= "3.11" and python_version < "4.0" sanic[ext]==23.6.0 ; python_version >= "3.11" and python_version < "4.0" -setuptools==68.0.0 ; python_version >= "3.11" and python_version < "4.0" +setuptools==68.1.2 ; python_version >= "3.11" and python_version < "4.0" sniffio==1.3.0 ; python_version >= "3.11" and python_version < "4.0" soupsieve==2.4.1 ; python_version >= "3.11" and python_version < "4.0" toolz==0.12.0 ; python_version >= "3.11" and python_version < "4.0" tracerite==1.1.0 ; python_version >= "3.11" and python_version < "4.0" -types-aiofiles==23.1.0.5 ; python_version >= "3.11" and python_version < "4.0" -types-beautifulsoup4==4.12.0.5 ; python_version >= "3.11" and python_version < "4.0" +types-aiofiles==23.2.0.0 ; python_version >= "3.11" and python_version < "4.0" +types-beautifulsoup4==4.12.0.6 ; python_version >= "3.11" and python_version < "4.0" types-html5lib==1.1.11.15 ; python_version >= "3.11" and python_version < "4.0" types-ujson==5.8.0.1 ; python_version >= "3.11" and python_version < "4.0" typing-extensions==4.7.1 ; python_version >= "3.11" and python_version < "4.0" From 4800ee96a82c0a9fc1905c6960cd560b55304944 Mon Sep 17 00:00:00 2001 From: Alexandre Teles Date: Sat, 19 Aug 2023 17:09:26 -0300 Subject: [PATCH 10/13] fix: remove revanced-api from tools map --- api/__init__.py | 4 +-- api/compat.py | 3 +- poetry.lock | 73 +++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 69 insertions(+), 11 deletions(-) diff --git a/api/__init__.py b/api/__init__.py index 0967429f..54740808 100644 --- a/api/__init__.py +++ b/api/__init__.py @@ -5,7 +5,7 @@ from api.ping import ping from api.socials import socials from api.info import info -from api.compat import github as old +from api.compat import github as compat from api.donations import donations -api = Blueprint.group(ping, github, info, socials, donations, old, url_prefix="/") +api = Blueprint.group(ping, github, info, socials, donations, compat, url_prefix="/") diff --git a/api/compat.py b/api/compat.py index 8d592def..b60a689e 100644 --- a/api/compat.py +++ b/api/compat.py @@ -52,7 +52,8 @@ async def tools(request: Request) -> JSONResponse: repositories=[ GithubRepository(owner=owner, name=repo) for repo in compat_repositories - if repo not in ["revanced-releases-api", "revanced-website"] + if repo + not in ["revanced-api", "revanced-releases-api", "revanced-website"] ], dev=True if request.args.get("dev") else False, ) diff --git a/poetry.lock b/poetry.lock index ec9e8c44..2475bdc5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,9 +1,10 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry and should not be changed by hand. [[package]] name = "aiodns" version = "3.0.0" description = "Simple DNS resolver for asyncio" +category = "main" optional = false python-versions = "*" files = [ @@ -18,6 +19,7 @@ pycares = ">=4.0.0" name = "aiofiles" version = "23.2.1" description = "File support for asyncio." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -29,6 +31,7 @@ files = [ name = "aiohttp" version = "3.8.5" description = "Async http client/server framework (asyncio)" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -139,6 +142,7 @@ speedups = ["Brotli", "aiodns", "cchardet"] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -153,6 +157,7 @@ frozenlist = ">=1.1.0" name = "anyio" version = "3.7.1" description = "High level compatibility layer for multiple asynchronous event loop implementations" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -173,6 +178,7 @@ trio = ["trio (<0.22)"] name = "async-timeout" version = "4.0.3" description = "Timeout context manager for asyncio programs" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -184,6 +190,7 @@ files = [ name = "asyncstdlib" version = "3.10.8" description = "The missing async toolbox" +category = "main" optional = false python-versions = "~=3.6" files = [ @@ -199,6 +206,7 @@ test = ["black", "coverage", "flake8", "flake8-2020", "flake8-bugbear", "mypy", name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -217,6 +225,7 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "beautifulsoup4" version = "4.12.2" description = "Screen-scraping library" +category = "main" optional = false python-versions = ">=3.6.0" files = [ @@ -235,6 +244,7 @@ lxml = ["lxml"] name = "brotli" version = "1.0.9" description = "Python bindings for the Brotli compression library" +category = "main" optional = false python-versions = "*" files = [ @@ -326,6 +336,7 @@ files = [ name = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -337,6 +348,7 @@ files = [ name = "cffi" version = "1.15.1" description = "Foreign Function Interface for Python calling C code." +category = "main" optional = false python-versions = "*" files = [ @@ -413,6 +425,7 @@ pycparser = "*" name = "charset-normalizer" version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -497,6 +510,7 @@ files = [ name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -508,6 +522,7 @@ files = [ name = "coverage" version = "7.3.0" description = "Code coverage measurement for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -572,6 +587,7 @@ toml = ["tomli"] name = "cytoolz" version = "0.12.2" description = "Cython implementation of Toolz: High performance functional utilities" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -680,6 +696,7 @@ cython = ["cython"] name = "frozenlist" version = "1.4.0" description = "A list-like structure which implements collections.abc.MutableSequence" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -750,6 +767,7 @@ files = [ name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -761,6 +779,7 @@ files = [ name = "html5tagger" version = "1.3.0" description = "Pythonic HTML generation/templating (no template files)" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -772,6 +791,7 @@ files = [ name = "httpcore" version = "0.17.3" description = "A minimal low-level HTTP client." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -783,16 +803,17 @@ files = [ anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = "==1.*" +sniffio = ">=1.0.0,<2.0.0" [package.extras] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (==1.*)"] +socks = ["socksio (>=1.0.0,<2.0.0)"] [[package]] name = "httptools" version = "0.6.0" description = "A collection of framework independent HTTP protocol utils." +category = "main" optional = false python-versions = ">=3.5.0" files = [ @@ -840,6 +861,7 @@ test = ["Cython (>=0.29.24,<0.30.0)"] name = "httpx" version = "0.24.1" description = "The next generation HTTP client." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -855,14 +877,15 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (==1.*)"] +socks = ["socksio (>=1.0.0,<2.0.0)"] [[package]] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -874,6 +897,7 @@ files = [ name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -885,6 +909,7 @@ files = [ name = "lxml" version = "4.9.3" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" files = [ @@ -992,6 +1017,7 @@ source = ["Cython (>=0.29.35)"] name = "multidict" version = "6.0.4" description = "multidict implementation" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1075,6 +1101,7 @@ files = [ name = "mypy" version = "1.5.1" description = "Optional static typing for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1120,6 +1147,7 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1131,6 +1159,7 @@ files = [ name = "packaging" version = "23.1" description = "Core utilities for Python packages" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1142,6 +1171,7 @@ files = [ name = "pluggy" version = "1.2.0" description = "plugin and hook calling mechanisms for python" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1157,6 +1187,7 @@ testing = ["pytest", "pytest-benchmark"] name = "pycares" version = "4.3.0" description = "Python interface for c-ares" +category = "main" optional = false python-versions = "*" files = [ @@ -1224,6 +1255,7 @@ idna = ["idna (>=2.1)"] name = "pycparser" version = "2.21" description = "C parser in Python" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1235,6 +1267,7 @@ files = [ name = "pydantic" version = "1.10.12" description = "Data validation and settings management using python type hints" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1287,6 +1320,7 @@ email = ["email-validator (>=1.0.3)"] name = "pytest" version = "7.4.0" description = "pytest: simple powerful testing with Python" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1307,6 +1341,7 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-asyncio" version = "0.21.1" description = "Pytest support for asyncio" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1325,6 +1360,7 @@ testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1343,6 +1379,7 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pytest-emoji" version = "0.2.0" description = "A pytest plugin that adds emojis to your test result report" +category = "main" optional = false python-versions = ">=3.4" files = [ @@ -1357,6 +1394,7 @@ pytest = ">=4.2.1" name = "pytest-md" version = "0.2.0" description = "Plugin for generating Markdown reports for pytest results" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1371,6 +1409,7 @@ pytest = ">=4.2.1" name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1420,6 +1459,7 @@ files = [ name = "sanic" version = "23.6.0" description = "A web server and web framework that's written to go fast. Build fast. Run fast." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1441,17 +1481,18 @@ uvloop = {version = ">=0.15.0", markers = "sys_platform != \"win32\" and impleme websockets = ">=10.0" [package.extras] -all = ["bandit", "beautifulsoup4", "black", "chardet (==3.*)", "coverage", "cryptography", "docutils", "enum-tools[sphinx]", "flake8", "isort (>=5.0.0)", "m2r2", "mistune (<2.0.0)", "mypy", "pygments", "pytest (==7.1.*)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "sphinx (>=2.1.2)", "sphinx-rtd-theme (>=0.4.3)", "towncrier", "tox", "types-ujson", "uvicorn (<0.15.0)"] -dev = ["bandit", "beautifulsoup4", "black", "chardet (==3.*)", "coverage", "cryptography", "docutils", "flake8", "isort (>=5.0.0)", "mypy", "pygments", "pytest (==7.1.*)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "towncrier", "tox", "types-ujson", "uvicorn (<0.15.0)"] +all = ["bandit", "beautifulsoup4", "black", "chardet (>=3.0.0,<4.0.0)", "coverage", "cryptography", "docutils", "enum-tools[sphinx]", "flake8", "isort (>=5.0.0)", "m2r2", "mistune (<2.0.0)", "mypy", "pygments", "pytest (>=7.1.0,<7.2.0)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "sphinx (>=2.1.2)", "sphinx-rtd-theme (>=0.4.3)", "towncrier", "tox", "types-ujson", "uvicorn (<0.15.0)"] +dev = ["bandit", "beautifulsoup4", "black", "chardet (>=3.0.0,<4.0.0)", "coverage", "cryptography", "docutils", "flake8", "isort (>=5.0.0)", "mypy", "pygments", "pytest (>=7.1.0,<7.2.0)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "towncrier", "tox", "types-ujson", "uvicorn (<0.15.0)"] docs = ["docutils", "enum-tools[sphinx]", "m2r2", "mistune (<2.0.0)", "pygments", "sphinx (>=2.1.2)", "sphinx-rtd-theme (>=0.4.3)"] ext = ["sanic-ext"] http3 = ["aioquic"] -test = ["bandit", "beautifulsoup4", "black", "chardet (==3.*)", "coverage", "docutils", "flake8", "isort (>=5.0.0)", "mypy", "pygments", "pytest (==7.1.*)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "types-ujson", "uvicorn (<0.15.0)"] +test = ["bandit", "beautifulsoup4", "black", "chardet (>=3.0.0,<4.0.0)", "coverage", "docutils", "flake8", "isort (>=5.0.0)", "mypy", "pygments", "pytest (>=7.1.0,<7.2.0)", "pytest-benchmark", "pytest-sanic", "sanic-testing (>=23.6.0)", "slotscheck (>=0.8.0,<1)", "types-ujson", "uvicorn (<0.15.0)"] [[package]] name = "sanic-ext" version = "23.6.0" description = "Extend your Sanic installation with some core functionality." +category = "main" optional = false python-versions = "*" files = [ @@ -1470,6 +1511,7 @@ test = ["Jinja2", "coverage", "pytest", "pytest-asyncio", "pytest-cov", "sanic-t name = "sanic-routing" version = "23.6.0" description = "Core routing component for Sanic" +category = "main" optional = false python-versions = "*" files = [ @@ -1481,6 +1523,7 @@ files = [ name = "sanic-testing" version = "23.6.0" description = "Core testing clients for Sanic" +category = "main" optional = false python-versions = "*" files = [ @@ -1495,6 +1538,7 @@ httpx = ">=0.18" name = "setuptools" version = "68.1.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1511,6 +1555,7 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1522,6 +1567,7 @@ files = [ name = "soupsieve" version = "2.4.1" description = "A modern CSS selector implementation for Beautiful Soup." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1533,6 +1579,7 @@ files = [ name = "toolz" version = "0.12.0" description = "List processing tools and functional utilities" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1544,6 +1591,7 @@ files = [ name = "tracerite" version = "1.1.0" description = "Human-readable HTML tracebacks for Python exceptions" +category = "main" optional = false python-versions = "*" files = [ @@ -1558,6 +1606,7 @@ html5tagger = ">=1.2.1" name = "types-aiofiles" version = "23.2.0.0" description = "Typing stubs for aiofiles" +category = "main" optional = false python-versions = "*" files = [ @@ -1569,6 +1618,7 @@ files = [ name = "types-beautifulsoup4" version = "4.12.0.6" description = "Typing stubs for beautifulsoup4" +category = "main" optional = false python-versions = "*" files = [ @@ -1583,6 +1633,7 @@ types-html5lib = "*" name = "types-html5lib" version = "1.1.11.15" description = "Typing stubs for html5lib" +category = "main" optional = false python-versions = "*" files = [ @@ -1594,6 +1645,7 @@ files = [ name = "types-ujson" version = "5.8.0.1" description = "Typing stubs for ujson" +category = "main" optional = false python-versions = "*" files = [ @@ -1605,6 +1657,7 @@ files = [ name = "typing-extensions" version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1616,6 +1669,7 @@ files = [ name = "ujson" version = "5.8.0" description = "Ultra fast JSON encoder and decoder for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1686,6 +1740,7 @@ files = [ name = "uvloop" version = "0.17.0" description = "Fast implementation of asyncio event loop on top of libuv" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1730,6 +1785,7 @@ test = ["Cython (>=0.29.32,<0.30.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "my name = "websockets" version = "11.0.3" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1809,6 +1865,7 @@ files = [ name = "yarl" version = "1.9.2" description = "Yet another URL library" +category = "main" optional = false python-versions = ">=3.7" files = [ From ffdb976f2c56d642f440f336a8f46be7b52eb5b1 Mon Sep 17 00:00:00 2001 From: Ushie Date: Sat, 19 Aug 2023 23:34:11 +0300 Subject: [PATCH 11/13] test: add info and donations tests --- api/models/info.py | 2 +- tests/test_donations.py | 15 +++++++++++++++ tests/test_info.py | 16 ++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tests/test_donations.py create mode 100644 tests/test_info.py diff --git a/api/models/info.py b/api/models/info.py index d1f3681d..208b2827 100644 --- a/api/models/info.py +++ b/api/models/info.py @@ -11,7 +11,7 @@ class InfoFields(BaseModel): name: str about: str contact: dict[str, str] - socials: SocialFields + socials: list[SocialFields] donations: DonationFields diff --git a/tests/test_donations.py b/tests/test_donations.py new file mode 100644 index 00000000..da56eb62 --- /dev/null +++ b/tests/test_donations.py @@ -0,0 +1,15 @@ +import pytest +from sanic import Sanic + +from api.models.donations import DonationsResponseModel + +from config import api_version + +# donations + + +@pytest.mark.asyncio +async def test_donations(app: Sanic): + _, response = await app.asgi_client.get(f"/{api_version}/donations") + assert response.status == 200 + assert DonationsResponseModel(**response.json) diff --git a/tests/test_info.py b/tests/test_info.py new file mode 100644 index 00000000..da540b2d --- /dev/null +++ b/tests/test_info.py @@ -0,0 +1,16 @@ +import pytest +from sanic import Sanic + +from api.models.info import InfoResponseModel + +from config import api_version + +# info + + +@pytest.mark.asyncio +async def test_info(app: Sanic): + _, response = await app.asgi_client.get(f"/{api_version}/info") + assert response.status == 200 + print(response.json) + assert InfoResponseModel(**response.json) From 5922830e0bf1c0504d3205d2fa864c76d0f09c02 Mon Sep 17 00:00:00 2001 From: Ushie Date: Sun, 20 Aug 2023 00:06:52 +0300 Subject: [PATCH 12/13] feat: use objects for contact field --- api/models/info.py | 10 ++++++++-- config.py | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/api/models/info.py b/api/models/info.py index 208b2827..a4c59875 100644 --- a/api/models/info.py +++ b/api/models/info.py @@ -2,15 +2,21 @@ from api.models.socials import SocialFields from pydantic import BaseModel +class ContactFields(BaseModel): + """ + Implements the fields for the API owner contact info. + """ + email: str + class InfoFields(BaseModel): """ - Implements the fields for a API owner info. + Implements the fields for the API owner info. """ name: str about: str - contact: dict[str, str] + contact: ContactFields socials: list[SocialFields] donations: DonationFields diff --git a/config.py b/config.py index ffea30c0..2bd06985 100644 --- a/config.py +++ b/config.py @@ -116,9 +116,9 @@ default_info: dict[str, str | list[str | bool] | bool] = { "name": owner, "about": "ReVanced was born out of Vanced's discontinuation and it is our goal to continue the legacy of what Vanced left behind. Thanks to ReVanced Patcher, it's possible to create long-lasting patches for nearly any Android app. ReVanced's patching system is designed to allow patches to work on new versions of the apps automatically with bare minimum maintenance.", - "contact": [ - {"method": "mail", "value": "contact@revanced.app"}, - ], + "contact": { + "email": "contact@revanced.app" + }, "socials": social_links, "donations": {"wallets": wallets, "links": links}, } From f51ccd5253be0595a89c4add8c911b49c22801d8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 19 Aug 2023 21:14:36 +0000 Subject: [PATCH 13/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- api/models/info.py | 2 ++ config.py | 4 +--- requirements.txt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/models/info.py b/api/models/info.py index a4c59875..34ec5ecf 100644 --- a/api/models/info.py +++ b/api/models/info.py @@ -2,10 +2,12 @@ from api.models.socials import SocialFields from pydantic import BaseModel + class ContactFields(BaseModel): """ Implements the fields for the API owner contact info. """ + email: str diff --git a/config.py b/config.py index 2bd06985..517e5cd2 100644 --- a/config.py +++ b/config.py @@ -116,9 +116,7 @@ default_info: dict[str, str | list[str | bool] | bool] = { "name": owner, "about": "ReVanced was born out of Vanced's discontinuation and it is our goal to continue the legacy of what Vanced left behind. Thanks to ReVanced Patcher, it's possible to create long-lasting patches for nearly any Android app. ReVanced's patching system is designed to allow patches to work on new versions of the apps automatically with bare minimum maintenance.", - "contact": { - "email": "contact@revanced.app" - }, + "contact": {"email": "contact@revanced.app"}, "socials": social_links, "donations": {"wallets": wallets, "links": links}, } diff --git a/requirements.txt b/requirements.txt index 0687027d..2f173586 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,18 +25,18 @@ idna==3.4 ; python_version >= "3.11" and python_version < "4.0" iniconfig==2.0.0 ; python_version >= "3.11" and python_version < "4.0" lxml==4.9.3 ; python_version >= "3.11" and python_version < "4.0" multidict==6.0.4 ; python_version >= "3.11" and python_version < "4.0" -mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "4.0" mypy==1.5.1 ; python_version >= "3.11" and python_version < "4.0" +mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "4.0" packaging==23.1 ; python_version >= "3.11" and python_version < "4.0" pluggy==1.2.0 ; python_version >= "3.11" and python_version < "4.0" pycares==4.3.0 ; python_version >= "3.11" and python_version < "4.0" pycparser==2.21 ; python_version >= "3.11" and python_version < "4.0" pydantic==1.10.12 ; python_version >= "3.11" and python_version < "4.0" +pytest==7.4.0 ; python_version >= "3.11" and python_version < "4.0" pytest-asyncio==0.21.1 ; python_version >= "3.11" and python_version < "4.0" pytest-cov==4.1.0 ; python_version >= "3.11" and python_version < "4.0" pytest-emoji==0.2.0 ; python_version >= "3.11" and python_version < "4.0" pytest-md==0.2.0 ; python_version >= "3.11" and python_version < "4.0" -pytest==7.4.0 ; python_version >= "3.11" and python_version < "4.0" pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "4.0" sanic-ext==23.6.0 ; python_version >= "3.11" and python_version < "4.0" sanic-routing==23.6.0 ; python_version >= "3.11" and python_version < "4.0"