From 6c81f87ea4f705294ec02f6442cb6cbcf835d813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9ry=20Febvre?= Date: Tue, 20 Dec 2022 14:34:41 +0100 Subject: [PATCH] Cleanup --- CODE_OF_CONDUCT.md | 1 - flatpak/flatpak-cargo-generator.py | 12 ++++++------ flatpak/flatpak-pip-generator | 3 +-- flatpak/python3-beautifulsoup4.json | 2 +- flatpak/python3-brotli.json | 2 +- flatpak/python3-cffi.json | 2 +- flatpak/python3-cloudscraper.json | 2 +- flatpak/python3-cryptography-cargo-deps.json | 2 +- flatpak/python3-dateparser.json | 2 +- flatpak/python3-emoji.json | 2 +- flatpak/python3-file-magic.json | 2 +- flatpak/python3-natsort.json | 2 +- flatpak/python3-pillow.json | 2 +- flatpak/python3-pure-protobuf.json | 2 +- flatpak/python3-rarfile.json | 2 +- flatpak/python3-setuptools_rust.json | 2 +- flatpak/python3-unidecode.json | 2 +- requirements.txt | 18 +++++++++--------- tests/servers/test_asurascans.py | 1 - 19 files changed, 30 insertions(+), 33 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f54d330f..6e930ba7 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -123,4 +123,3 @@ Additional language was incorporated and modified from the following Codes of Co * [Mozilla Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/) is licensed [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/). * [Python Mentors Code of Conduct](http://pythonmentors.com/) * [Speak Up! Community Code of Conduct](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html), licensed under a [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/) - diff --git a/flatpak/flatpak-cargo-generator.py b/flatpak/flatpak-cargo-generator.py index 384a8287..0bcee05f 100644 --- a/flatpak/flatpak-cargo-generator.py +++ b/flatpak/flatpak-cargo-generator.py @@ -28,14 +28,14 @@ def canonical_url(url): u = urlparse(url) # It seems cargo drops query and fragment u = ParseResult(u.scheme, u.netloc, u.path, None, None, None) - u = u._replace(path = u.path.rstrip('/')) + u = u._replace(path=u.path.rstrip('/')) if u.netloc == 'github.com': - u = u._replace(scheme = 'https') - u = u._replace(path = u.path.lower()) + u = u._replace(scheme='https') + u = u._replace(path=u.path.lower()) if u.path.endswith('.git'): - u = u._replace(path = u.path[:-len('.git')]) + u = u._replace(path=u.path[:-len('.git')]) return u @@ -91,7 +91,7 @@ def find_cargo_toml(git_repo_dir): f'Multiple Cargo.toml files found in {git_repo_dir}\n' 'Please report this error and the link to the affected repisitory here:\n' 'https://github.com/flatpak/flatpak-builder-tools/issues' - ) + ) raise Exception(f'No Cargo.toml found in {git_repo_dir}') @@ -234,7 +234,7 @@ async def get_git_package_sources(package, git_repos): { 'type': 'inline', 'contents': json.dumps({'package': None, 'files': {}}), - 'dest': f'{CARGO_CRATES}/{name}', #-{version}', + 'dest': f'{CARGO_CRATES}/{name}', # -{version}', 'dest-filename': '.cargo-checksum.json', } ] diff --git a/flatpak/flatpak-pip-generator b/flatpak/flatpak-pip-generator index 26cb486c..2f56197c 100755 --- a/flatpak/flatpak-pip-generator +++ b/flatpak/flatpak-pip-generator @@ -13,7 +13,6 @@ import tempfile import urllib.request from collections import OrderedDict -from typing import Dict try: import requirements @@ -197,7 +196,7 @@ if opts.runtime: if os.path.exists(requirements_file): prefix = os.path.realpath(requirements_file) flag = '--filesystem={}'.format(prefix) - flatpak_cmd.insert(1,flag) + flatpak_cmd.insert(1, flag) else: flatpak_cmd = [pip_executable] diff --git a/flatpak/python3-beautifulsoup4.json b/flatpak/python3-beautifulsoup4.json index fd421c0c..99b0c3e0 100644 --- a/flatpak/python3-beautifulsoup4.json +++ b/flatpak/python3-beautifulsoup4.json @@ -16,4 +16,4 @@ "sha256": "c2c1c2d44f158cdbddab7824a9af8c4f83c76b1e23e049479aa432feb6c4c23b" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-brotli.json b/flatpak/python3-brotli.json index 7019a4b3..62b66e21 100644 --- a/flatpak/python3-brotli.json +++ b/flatpak/python3-brotli.json @@ -11,4 +11,4 @@ "sha256": "4d1b810aa0ed773f81dceda2cc7b403d01057458730e309856356d4ef4188438" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-cffi.json b/flatpak/python3-cffi.json index 8f77c626..23ba983e 100644 --- a/flatpak/python3-cffi.json +++ b/flatpak/python3-cffi.json @@ -16,4 +16,4 @@ "sha256": "7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-cloudscraper.json b/flatpak/python3-cloudscraper.json index d328d147..22f571c5 100644 --- a/flatpak/python3-cloudscraper.json +++ b/flatpak/python3-cloudscraper.json @@ -46,4 +46,4 @@ "sha256": "84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-cryptography-cargo-deps.json b/flatpak/python3-cryptography-cargo-deps.json index 652e1e09..ad4d5b32 100644 --- a/flatpak/python3-cryptography-cargo-deps.json +++ b/flatpak/python3-cryptography-cargo-deps.json @@ -590,4 +590,4 @@ "dest": "cargo", "dest-filename": "config" } -] \ No newline at end of file +] diff --git a/flatpak/python3-dateparser.json b/flatpak/python3-dateparser.json index 9add768f..a68cb087 100644 --- a/flatpak/python3-dateparser.json +++ b/flatpak/python3-dateparser.json @@ -41,4 +41,4 @@ "sha256": "8314c9692a636c8eb3bda879b9f119e350e93223ae83e70e80c31675a0fdc1a6" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-emoji.json b/flatpak/python3-emoji.json index 4f1ab2df..1e5ce0cf 100644 --- a/flatpak/python3-emoji.json +++ b/flatpak/python3-emoji.json @@ -11,4 +11,4 @@ "sha256": "a2986c21e4aba6b9870df40ef487a17be863cb7778dcf1c01e25917b7cd210bb" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-file-magic.json b/flatpak/python3-file-magic.json index f6dabb2e..e14a41d3 100644 --- a/flatpak/python3-file-magic.json +++ b/flatpak/python3-file-magic.json @@ -11,4 +11,4 @@ "sha256": "8ea03da58cf4de5a69909c0e27746cf17fc903356a601967ab01577916a73aed" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-natsort.json b/flatpak/python3-natsort.json index 8f6f53da..f2891227 100644 --- a/flatpak/python3-natsort.json +++ b/flatpak/python3-natsort.json @@ -11,4 +11,4 @@ "sha256": "d0f4fc06ca163fa4a5ef638d9bf111c67f65eedcc7920f98dec08e489045b67e" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-pillow.json b/flatpak/python3-pillow.json index f37520b0..e1a0e039 100644 --- a/flatpak/python3-pillow.json +++ b/flatpak/python3-pillow.json @@ -11,4 +11,4 @@ "sha256": "a0b49960110bc6ff5fead46013bcb8825d101026d466f3a4de3476defe0fb0dd" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-pure-protobuf.json b/flatpak/python3-pure-protobuf.json index ba9b023f..374553fa 100644 --- a/flatpak/python3-pure-protobuf.json +++ b/flatpak/python3-pure-protobuf.json @@ -11,4 +11,4 @@ "sha256": "d1d6e6133b91f56cfda6d616e60890eabea0e2634ecb562717525684346451e9" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-rarfile.json b/flatpak/python3-rarfile.json index 5e347106..a72cfeaf 100644 --- a/flatpak/python3-rarfile.json +++ b/flatpak/python3-rarfile.json @@ -11,4 +11,4 @@ "sha256": "1094869119012f95c31a6f22cc3a9edbdca61861b805241116adbe2d737b68f8" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-setuptools_rust.json b/flatpak/python3-setuptools_rust.json index feb92a7c..c2b4efc8 100644 --- a/flatpak/python3-setuptools_rust.json +++ b/flatpak/python3-setuptools_rust.json @@ -26,4 +26,4 @@ "sha256": "25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02" } ] -} \ No newline at end of file +} diff --git a/flatpak/python3-unidecode.json b/flatpak/python3-unidecode.json index d34e31c2..94e126bf 100644 --- a/flatpak/python3-unidecode.json +++ b/flatpak/python3-unidecode.json @@ -11,4 +11,4 @@ "sha256": "1d7a042116536098d05d599ef2b8616759f02985c85b4fef50c78a5aaf10822a" } ] -} \ No newline at end of file +} diff --git a/requirements.txt b/requirements.txt index 6f91fdd4..1e5c5cfd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,14 @@ -PyGObject -natsort -Pillow beautifulsoup4 -lxml -keyring >= 21.6.0 +brotli +cloudscraper dateparser >= 1.1.4 emoji -python_magic +keyring >= 21.6.0 +lxml +natsort +Pillow pure-protobuf -cloudscraper -Unidecode -brotli +PyGObject +python_magic rarfile +Unidecode diff --git a/tests/servers/test_asurascans.py b/tests/servers/test_asurascans.py index 311e8f34..699d25aa 100644 --- a/tests/servers/test_asurascans.py +++ b/tests/servers/test_asurascans.py @@ -1,7 +1,6 @@ import logging import pytest from pytest_steps import test_steps -import urllib from komikku.utils import log_error_traceback