mirror of https://github.com/bbilly1/tilefy.git
fix linter
This commit is contained in:
parent
2d6ad2c504
commit
046603b897
|
@ -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"
|
||||
|
||||
}
|
||||
|
|
|
@ -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":
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue