From 694338a358393e7db8d7614cd17c05c27ab90076 Mon Sep 17 00:00:00 2001 From: Biel Stela Date: Wed, 20 Dec 2023 16:26:06 +0100 Subject: [PATCH] Remove debug flag --- data/.pre-commit-config.yaml | 67 ++++++++++++++++++++---------------- tiler/app/main.py | 6 ++-- 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/data/.pre-commit-config.yaml b/data/.pre-commit-config.yaml index f1d2685196..9c442b98a0 100644 --- a/data/.pre-commit-config.yaml +++ b/data/.pre-commit-config.yaml @@ -1,35 +1,42 @@ repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 - hooks: - - id: check-yaml - - id: end-of-file-fixer - - id: trailing-whitespace + - repo: https://github.com/gitleaks/gitleaks + rev: v8.17.0 + hooks: + - id: gitleaks-docker - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.275 - hooks: - - id: ruff - args: [ "--line-length=120", "--select=E,F,N", "--fix"] + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.12.1 + hooks: + - id: validate-pyproject - - repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black - args: [ "--line-length=120" ] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace - - repo: https://github.com/nbQA-dev/nbQA - rev: 1.7.0 - hooks: - - id: nbqa-black - args: [ "--line-length=100"] - - id: nbqa-isort - args: [ "--float-to-top", "--profile=black"] - - id: nbqa-ruff - args: [ "--line-length=100" , "--select=E,F,N", "--fix"] + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.4 + hooks: + - id: ruff + args: [--fix] + types_or: [python, pyi, jupyter] - # check for private keys and passwords! - - repo: https://github.com/gitleaks/gitleaks - rev: v8.17.0 - hooks: - - id: gitleaks-docker + - id: ruff-format + types_or: [python, pyi, jupyter] + + # - repo: https://github.com/pre-commit/mirrors-mypy + # rev: v1.3.0 + # hooks: + # - id: mypy + # language_version: python + # exclude: tests/.* + # additional_dependencies: + # - types-simplejson + # - types-attrs + # - pydantic~=2.0 + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.3 + hooks: + - id: prettier diff --git a/tiler/app/main.py b/tiler/app/main.py index afabde7104..663438ba3f 100644 --- a/tiler/app/main.py +++ b/tiler/app/main.py @@ -1,8 +1,10 @@ +"""Main app entrypoint.""" + from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from titiler.core import TilerFactory from titiler.core.errors import DEFAULT_STATUS_CODES, add_exception_handlers -from titiler.core.middleware import TotalTimeMiddleware, LoggerMiddleware +from titiler.core.middleware import LoggerMiddleware, TotalTimeMiddleware from .config.config import get_settings from .middlewares.auth_middleware import AuthMiddleware @@ -14,7 +16,7 @@ ) titiler_prefix = get_settings().titiler_prefix if get_settings().titiler_prefix is not None else "/cog" -app = FastAPI(title="LandGriffon Tiler", docs_url="/tiler/docs", openapi_url="/tiler", debug=True) +app = FastAPI(title="LandGriffon Tiler", docs_url="/tiler/docs", openapi_url="/tiler") app.add_middleware(TotalTimeMiddleware) app.add_middleware(LoggerMiddleware) app.add_middleware(AuthMiddleware)