@@ -6,16 +6,15 @@ readme = {file = "README.md", content-type = "text/markdown" }
66requires-python = " >= 3.8"
77dependencies = [
88 " click>=8.0.0" ,
9- " fastapi[standard]>=0.109.1" , # Vulnerable to https://osv.dev/vulnerability/PYSEC-2024-38
9+ " fastapi[standard]>=0.109.1" , # Minimum safe release ( https://osv.dev/vulnerability/PYSEC-2024-38)
1010 " pydantic" ,
1111 " python-dotenv" ,
1212 " slowapi" ,
13- " starlette>=0.40.0" , # Vulnerable to https://osv.dev/vulnerability/GHSA-f96h-pmfr-66vw
13+ " starlette>=0.40.0" , # Minimum safe release ( https://osv.dev/vulnerability/GHSA-f96h-pmfr-66vw)
1414 " tiktoken>=0.7.0" , # Support for o200k_base encoding
15- " tomli" ,
1615 " pathspec>=0.12.1" ,
17- " typing_extensions; python_version < '3.10'" ,
18- " uvicorn>=0.11.7" , # Vulnerable to https://osv.dev/vulnerability/PYSEC-2020-150
16+ " typing_extensions>= 4.0.0 ; python_version < '3.10'" ,
17+ " uvicorn>=0.11.7" , # Minimum safe release ( https://osv.dev/vulnerability/PYSEC-2020-150)
1918]
2019
2120license = {file = " LICENSE" }
@@ -62,20 +61,46 @@ disable = [
6261 " fixme" ,
6362]
6463
64+ [tool .ruff ]
65+ line-length = 119
66+ fix = true
67+
68+ [tool .ruff .lint ]
69+ select = [" ALL" ]
70+ ignore = [ # https://docs.astral.sh/ruff/rules/...
71+ " D107" , # undocumented-public-init
72+ " FIX002" , # line-contains-todo
73+ " TD002" , # missing-todo-author
74+ " PLR0913" , # too-many-arguments,
75+
76+ # TODO: fix the following issues:
77+ " TD003" , # missing-todo-link, TODO: add issue links
78+ " T201" , # print, TODO: replace with logging
79+ " S108" , # hardcoded-temp-file, TODO: replace with tempfile
80+ " BLE001" , # blind-except, TODO: replace with specific exceptions
81+ " FAST003" , # fast-api-unused-path-parameter, TODO: fix
82+ ]
83+ per-file-ignores = { "tests/**/*.py" = [" S101" ] } # Skip the “assert used” warning
84+
85+ [tool .ruff .lint .pylint ]
86+ max-returns = 10
87+
88+ [tool .ruff .lint .isort ]
89+ order-by-type = true
90+ case-sensitive = true
91+
6592[tool .pycln ]
6693all = true
6794
95+ # TODO: Remove this once we figure out how to use ruff-isort
6896[tool .isort ]
6997profile = " black"
7098line_length = 119
7199remove_redundant_aliases = true
72- float_to_top = true
100+ float_to_top = true # https://github.com/astral-sh/ruff/issues/6514
73101order_by_type = true
74102filter_files = true
75103
76- [tool .black ]
77- line-length = 119
78-
79104# Test configuration
80105[tool .pytest .ini_options ]
81106pythonpath = [" src" ]
0 commit comments