Skip to content
Snippets Groups Projects
Commit a1a1da41 authored by Erik Reid's avatar Erik Reid
Browse files

ruffed

parent 4a6b2faa
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ from fastapi import FastAPI ...@@ -6,6 +6,7 @@ from fastapi import FastAPI
from mapping_provider.api import common, map from mapping_provider.api import common, map
def create_app() -> FastAPI: def create_app() -> FastAPI:
""" """
Creates the FastAPI application instance, with routers attached. Creates the FastAPI application instance, with routers attached.
......
from importlib.metadata import version
from fastapi import APIRouter
import jsonschema import jsonschema
from pydantic import BaseModel
import requests import requests
from fastapi import APIRouter
from pydantic import BaseModel
router = APIRouter() router = APIRouter()
......
[tool.ruff] [tool.ruff]
line-length = 120 line-length = 120
target-version = "py313" target-version = "py313"
select = ["E", "F", "I", "B", "UP", "N"] lint.select = ["E", "F", "I", "B", "UP", "N"]
fixable = ["ALL"] lint.fixable = ["ALL"]
exclude = ["tests", "docs", "build"] exclude = ["tests", "docs", "build"]
[tool.mypy] [tool.mypy]
python_version = "3.13" python_version = "3.13"
strict = true strict = true
warn_unused_ignores = true warn_unused_ignores = true
warn_return_any = true warn_return_any = true
\ No newline at end of file
from fastapi.testclient import TestClient
import pytest import pytest
from fastapi.testclient import TestClient
from mapping_provider import create_app from mapping_provider import create_app
......
...@@ -4,7 +4,7 @@ import re ...@@ -4,7 +4,7 @@ import re
import responses import responses
from mapping_provider.api.map import SiteList, RouterList, ServiceList from mapping_provider.api.map import RouterList, ServiceList, SiteList
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data') DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
......
...@@ -4,11 +4,11 @@ envlist = lint, typecheck, docs ...@@ -4,11 +4,11 @@ envlist = lint, typecheck, docs
[testenv:lint] [testenv:lint]
description = Lint code with Ruff description = Lint code with Ruff
deps = ruff deps = ruff
commands = ruff check mapping_provider commands = ruff check mapping_provider test
[testenv:typecheck] [testenv:typecheck]
description = Type-check code with mypy description = Type-check code with mypy
deps = mypy deps = mypy types-jsonschema types-requests
commands = mypy mapping_provider commands = mypy mapping_provider
[testenv:docs] [testenv:docs]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment