Fix lint
This commit is contained in:
parent
73db6a31f6
commit
76cdd7b4c4
5 changed files with 8 additions and 5 deletions
|
|
@ -23,7 +23,7 @@ def main() -> None:
|
|||
module = import_module(file_name)
|
||||
|
||||
if not function_name:
|
||||
logger.warning(f"Argument function_name not provided, trying to guess it")
|
||||
logger.warning("Argument function_name not provided, trying to guess it")
|
||||
|
||||
if not function_name and "app" in module.__dict__:
|
||||
function_name = "app"
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class GreatAI(FastAPI):
|
|||
return get_swagger_ui_html(openapi_url="openapi.json", title=self.title)
|
||||
|
||||
@self.get("/docs/index.html", include_in_schema=False)
|
||||
def redirect_to_entrypoint() -> RedirectResponse:
|
||||
def redirect_to_docs() -> RedirectResponse:
|
||||
return RedirectResponse("/docs")
|
||||
|
||||
if not disable_metrics:
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ def parallel_map(
|
|||
)
|
||||
|
||||
if concurrency == 1 or len(values) <= chunk_size:
|
||||
logger.warning(f"Running in series, there is no reason for parallelism")
|
||||
logger.warning("Running in series, there is no reason for parallelism")
|
||||
iterable = values if disable_progress else tqdm(values)
|
||||
return [function(v) for v in iterable]
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ python3 -m black . --exclude .env --check
|
|||
yes | python3 -m mypy . --install-types > /dev/null || true
|
||||
python3 -m mypy --namespace-packages --ignore-missing-imports --install-types --non-interactive --disallow-untyped-defs --disallow-incomplete-defs --follow-imports=silent --exclude=external/ --exclude=/build/ --pretty .
|
||||
|
||||
python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E402,F821,W503,E722,E203
|
||||
python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E722,E402,W503,E203
|
||||
|
||||
cd -
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
set -e
|
||||
|
||||
echo "Installing dependencies if necessary"
|
||||
python3 -m pip install --upgrade autoflake isort black[jupyter] mypy
|
||||
python3 -m pip install --upgrade autoflake isort black[jupyter] mypy flake8
|
||||
|
||||
echo "Formatting and checking $1"
|
||||
|
||||
|
|
@ -21,4 +21,7 @@ python3 -m black . --exclude .env
|
|||
echo Running mypy
|
||||
python3 -m mypy --namespace-packages --ignore-missing-imports --install-types --non-interactive --disallow-untyped-defs --disallow-incomplete-defs --pretty --follow-imports=silent --exclude=external/ --exclude=/build/ .
|
||||
|
||||
echo Running Flake8
|
||||
python3 -m flake8 . --count --show-source --statistics --exclude=__init__.py,.env,external --ignore=E501,E722,E402,W503,E203
|
||||
|
||||
cd -
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue