fix linter

This commit is contained in:
Simon 2024-02-20 14:01:34 +01:00
parent 2d6ad2c504
commit 046603b897
Signed by: simon
GPG Key ID: 2C15AA5E89985DD4
3 changed files with 8 additions and 6 deletions

View File

@ -36,12 +36,12 @@ function validate {
echo "running black"
black --diff --color --check -l 79 "$check_path"
echo "running codespell"
codespell --skip="./.git" "$check_path"
codespell --skip="./.git,./.venv,./.mypy_cache" "$check_path"
echo "running flake8"
flake8 "$check_path" --count --max-complexity=10 --max-line-length=79 \
--show-source --statistics
--show-source --statistics --exclude ".venv"
echo "running isort"
isort --check-only --diff --profile black -l 79 "$check_path"
isort --skip ".venv" --check-only --diff --profile black -l 79 "$check_path"
printf " \n> all validations passed\n"
}

View File

@ -68,7 +68,7 @@ class Api:
return response
def plugin(self):
"""make request with pugin"""
"""make request with plugin"""
plugin_name = self.tile_config["plugin"]["name"]
item_id = self.tile_config["plugin"]["id"]
if plugin_name == "chrome-extension-users":

View File

@ -9,7 +9,9 @@ from bs4 import BeautifulSoup
class ChromeExtension:
"""scrape chome extension for user number"""
HEADERS = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36"} # pylint: disable=line-too-long
HEADERS = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" # noqa: E501
}
def __init__(self, extension_id):
self.extension_id = extension_id
@ -23,7 +25,7 @@ class ChromeExtension:
def get_soup(self):
"""get the soup"""
url = f"https://chromewebstore.google.com/detail/tubearchivist-companion/{self.extension_id}?hl=en&authuser=0" # pylint: disable=line-too-long
url = f"https://chromewebstore.google.com/detail/tubearchivist-companion/{self.extension_id}?hl=en&authuser=0" # noqa: E501
response = requests.get(url, headers=self.HEADERS)
soup = BeautifulSoup(response.text, "html.parser")