diff --git a/great_ai/src/great_ai/__main__.py b/great_ai/src/great_ai/__main__.py index 3f2acab..6f6da92 100644 --- a/great_ai/src/great_ai/__main__.py +++ b/great_ai/src/great_ai/__main__.py @@ -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" diff --git a/great_ai/src/great_ai/great_ai/deploy/great_ai.py b/great_ai/src/great_ai/great_ai/deploy/great_ai.py index 45d0453..5b1c7b9 100644 --- a/great_ai/src/great_ai/great_ai/deploy/great_ai.py +++ b/great_ai/src/great_ai/great_ai/deploy/great_ai.py @@ -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: diff --git a/great_ai/src/great_ai/utilities/parallel_map.py b/great_ai/src/great_ai/utilities/parallel_map.py index d62ed6c..4b5d6f4 100644 --- a/great_ai/src/great_ai/utilities/parallel_map.py +++ b/great_ai/src/great_ai/utilities/parallel_map.py @@ -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] diff --git a/scripts/check-python.sh b/scripts/check-python.sh index 065e5e0..4c239d9 100755 --- a/scripts/check-python.sh +++ b/scripts/check-python.sh @@ -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 - diff --git a/scripts/format-python.sh b/scripts/format-python.sh index 0eb3661..e4e9a8d 100755 --- a/scripts/format-python.sh +++ b/scripts/format-python.sh @@ -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 -