11[project ]
22authors = [
3- {name = " Cody Fincher" , email = " cody@litestar.dev" },
4- {name = " Jacob Coffee" , email = " jacob@litestar.dev" },
5- {name = " Janek Nouvertné" , email = " janek@litestar.dev" },
6- {name = " Na'aman Hirschfeld" , email = " nhirschfeld@gmail.com" },
7- {name = " Peter Schutt" , email = " peter@litestar.dev" },
3+ { name = " Cody Fincher" , email = " cody@litestar.dev" },
4+ { name = " Jacob Coffee" , email = " jacob@litestar.dev" },
5+ { name = " Janek Nouvertné" , email = " janek@litestar.dev" },
6+ { name = " Na'aman Hirschfeld" , email = " nhirschfeld@gmail.com" },
7+ { name = " Peter Schutt" , email = " peter@litestar.dev" },
88]
99classifiers = [
1010 " Development Status :: 5 - Production/Stable" ,
@@ -47,19 +47,18 @@ dependencies = [
4747 " rich-click" ,
4848 " multipart>=1.2.0" ,
4949 # default litestar plugins
50- " litestar-htmx>=0.4.0"
50+ " litestar-htmx>=0.4.0" ,
5151]
5252description = " Litestar - A production-ready, highly performant, extensible ASGI API Framework"
5353keywords = [" api" , " rest" , " asgi" , " litestar" , " starlite" ]
54- license = {text = " MIT" }
54+ license = { text = " MIT" }
5555maintainers = [
56- {name = " Litestar Developers" , email = " hello@litestar.dev" },
57- {name = " Cody Fincher" , email = " cody@litestar.dev" },
58- {name = " Jacob Coffee" , email = " jacob@litestar.dev" },
59- {name = " Janek Nouvertné" , email = " janek@litestar.dev" },
60- {name = " Peter Schutt" , email = " peter@litestar.dev" },
61- {name = " Visakh Unnikrishnan" , email = " guacs@litestar.dev" },
62- {name = " Alc" , email = " alc@litestar.dev" }
56+ { name = " Litestar Developers" , email = " hello@litestar.dev" },
57+ { name = " Cody Fincher" , email = " cody@litestar.dev" },
58+ { name = " Jacob Coffee" , email = " jacob@litestar.dev" },
59+ { name = " Janek Nouvertné" , email = " janek@litestar.dev" },
60+ { name = " Visakh Unnikrishnan" , email = " guacs@litestar.dev" },
61+ { name = " Julien Courtes" , email = " julien@litestar.dev" },
6362]
6463name = " litestar"
6564readme = " README.md"
@@ -70,14 +69,14 @@ version = "2.15.1"
7069Blog = " https://blog.litestar.dev"
7170Changelog = " https://github.com/litestar-org/litestar/releases/"
7271Discord = " https://discord.gg/litestar"
72+ Discussions = " https://github.com/litestar-org/litestar/discussions"
7373Documentation = " https://docs.litestar.dev/"
74+ Funding = " https://github.com/sponsors/litestar-org"
7475Homepage = " https://litestar.dev/"
7576"Issue Tracker" = " https://github.com/litestar-org/litestar/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc"
7677Reddit = " https://www.reddit.com/r/LitestarAPI"
7778Repository = " https://github.com/litestar-org/litestar"
7879Twitter = " https://twitter.com/LitestarAPI"
79- Funding = " https://github.com/sponsors/litestar-org"
80- Discussions = " https://github.com/litestar-org/litestar/discussions"
8180
8281[project .optional-dependencies ]
8382annotated-types = [" annotated-types" ]
@@ -90,10 +89,7 @@ full = [
9089 " litestar[annotated-types,attrs,brotli,cli,cryptography,jinja,jwt,mako,minijinja,opentelemetry,piccolo,prometheus,pydantic,redis,sqlalchemy,standard,structlog,valkey]; python_version >= \" 3.13\" " ,
9190]
9291jinja = [" jinja2>=3.1.2" ]
93- jwt = [
94- " cryptography" ,
95- " pyjwt>=2.9.0" ,
96- ]
92+ jwt = [" cryptography" , " pyjwt>=2.9.0" ]
9793mako = [" mako>=1.2.4" ]
9894minijinja = [" minijinja>=1.0.0" ]
9995opentelemetry = [" opentelemetry-instrumentation-asgi" ]
@@ -107,20 +103,23 @@ pydantic = [
107103 " pydantic-extra-types; python_version >= \" 3.9\" " ,
108104]
109105redis = [" redis[hiredis]>=4.4.4" ]
110- valkey = [" valkey[libvalkey]>=6.0.2" ]
111106sqlalchemy = [" advanced-alchemy>=0.2.2" ]
112- standard = [" jinja2" , " jsbeautifier" , " uvicorn[standard]" , " uvloop>=0.18.0; sys_platform != 'win32'" , " fast-query-parsers>=1.0.2" ]
107+ standard = [
108+ " jinja2" ,
109+ " jsbeautifier" ,
110+ " uvicorn[standard]" ,
111+ " uvloop>=0.18.0; sys_platform != 'win32'" ,
112+ " fast-query-parsers>=1.0.2" ,
113+ ]
113114structlog = [" structlog" ]
115+ valkey = [" valkey[libvalkey]>=6.0.2" ]
114116
115117[project .scripts ]
116118litestar = " litestar.__main__:run_cli"
117119
118120
119121[tool .hatch .build .targets .sdist ]
120- include = [
121- ' docs/PYPI_README.md' ,
122- ' /litestar' ,
123- ]
122+ include = [' docs/PYPI_README.md' , ' /litestar' ]
124123
125124
126125[tool .uv ]
@@ -147,7 +146,7 @@ dev = [
147146 " hypercorn>=0.16.0" ,
148147 " daphne>=4.0.0" ,
149148 " opentelemetry-sdk" ,
150- " httpx-sse"
149+ " httpx-sse" ,
151150]
152151
153152docs = [
@@ -205,17 +204,13 @@ plugins = ["covdefaults"]
205204source = [" litestar" ]
206205
207206[tool .coverage .report ]
208- exclude_lines = [
209- ' except ImportError\b' ,
210- ' if VERSION.startswith("1"):' ,
211- ' if pydantic.VERSION.startswith("1"):' ,
212- ]
207+ exclude_lines = [' except ImportError\b' , ' if VERSION.startswith("1"):' , ' if pydantic.VERSION.startswith("1"):' ]
213208fail_under = 50
214209
215210[tool .pytest .ini_options ]
216211addopts = " --strict-markers --strict-config --dist=loadgroup -m 'not server_integration'"
217- asyncio_mode = " auto"
218212asyncio_default_fixture_loop_scope = " function"
213+ asyncio_mode = " auto"
219214filterwarnings = [
220215 " error" ,
221216 # https://github.com/pytest-dev/pytest-asyncio/issues/724
@@ -230,7 +225,7 @@ filterwarnings = [
230225 " ignore::DeprecationWarning:litestar.*" ,
231226 " ignore::pydantic.PydanticDeprecatedSince20::" ,
232227 " ignore:`general_plain_validator_function`:DeprecationWarning::" ,
233- " ignore: 'RichMultiCommand':DeprecationWarning::" , # this is coming from rich_click itself, nothing we can do about # that for now
228+ " ignore: 'RichMultiCommand':DeprecationWarning::" , # this is coming from rich_click itself, nothing we can do about # that for now
234229 " ignore: Dropping max_length:litestar.exceptions.LitestarWarning:litestar.contrib.piccolo" ,
235230 " ignore: Python Debugger on exception enabled:litestar.exceptions.LitestarWarning:" ,
236231 " ignore: datetime.datetime.utcnow:DeprecationWarning:time_machine" ,
@@ -243,8 +238,6 @@ testpaths = ["tests", "docs/examples/testing"]
243238xfail_strict = true
244239
245240[tool .mypy ]
246- packages = [" litestar" , " tests" ]
247- plugins = [" pydantic.mypy" ]
248241enable_error_code = [
249242 " truthy-bool" ,
250243 " truthy-iterable" ,
@@ -253,21 +246,23 @@ enable_error_code = [
253246 " possibly-undefined" ,
254247 " redundant-self" ,
255248]
249+ packages = [" litestar" , " tests" ]
250+ plugins = [" pydantic.mypy" ]
256251python_version = " 3.8"
257252
258253disallow_any_generics = false
254+ local_partial_types = true
259255show_error_codes = true
260256strict = true
261257warn_unreachable = true
262- local_partial_types = true
263258
264259[[tool .mypy .overrides ]]
265260ignore_errors = true
266261module = [" tests.examples.*" , " tests.docker_service_fixtures" ]
267262
268263[[tool .mypy .overrides ]]
269- module = [" tests.*" ]
270264disable_error_code = [" truthy-bool" ]
265+ module = [" tests.*" ]
271266
272267[[tool .mypy .overrides ]]
273268disable_error_code = [" assignment" ]
@@ -282,12 +277,12 @@ module = ["tests.unit.test_contrib.test_repository"]
282277strict_equality = false
283278
284279[[tool .mypy .overrides ]]
285- module = [" tests.unit.test_plugins.test_pydantic.test_openapi" ," litestar._asgi.routing_trie.traversal" ]
286280disable_error_code = " index, union-attr"
281+ module = [" tests.unit.test_plugins.test_pydantic.test_openapi" , " litestar._asgi.routing_trie.traversal" ]
287282
288283[[tool .mypy .overrides ]]
289- module = [" tests.unit.test_channels.test_subscriber" , " tests.unit.test_response.test_streaming_response" ]
290284disable_error_code = " arg-type, comparison-overlap, unreachable"
285+ module = [" tests.unit.test_channels.test_subscriber" , " tests.unit.test_response.test_streaming_response" ]
291286
292287[[tool .mypy .overrides ]]
293288ignore_missing_imports = true
@@ -303,7 +298,6 @@ module = [
303298]
304299
305300[[tool .mypy .overrides ]]
306- warn_unused_ignores = false
307301module = [
308302 " litestar.contrib.sqlalchemy.*" ,
309303 " litestar.plugins.pydantic.*" ,
@@ -313,17 +307,14 @@ module = [
313307 " litestar.openapi.spec.base" ,
314308 " litestar.utils.helpers" ,
315309 " litestar.channels.plugin" ,
316- " litestar.handlers.http_handlers._utils"
310+ " litestar.handlers.http_handlers._utils" ,
317311]
312+ warn_unused_ignores = false
318313
319314[[tool .mypy .overrides ]]
320- warn_unused_ignores = false
321- module = [
322- " litestar.openapi.spec.base" ,
323- " litestar._asgi.routin_trie.traversal" ,
324- " litestar.plugins.pydantic.plugins.int" ,
325- ]
326315disable_error_code = " arg-type"
316+ module = [" litestar.openapi.spec.base" , " litestar._asgi.routin_trie.traversal" , " litestar.plugins.pydantic.plugins.int" ]
317+ warn_unused_ignores = false
327318
328319[tool .pydantic-mypy ]
329320init_forbid_extra = true
@@ -350,7 +341,6 @@ pythonVersion = "3.8"
350341reportUnnecessaryTypeIgnoreComments = true
351342
352343[tool .slotscheck ]
353- strict-imports = false
354344exclude-classes = """
355345(
356346 # github.com/python/cpython/pull/106771
@@ -370,70 +360,68 @@ exclude-classes = """
370360 |(^litestar.utils.sync:AsyncIteratorWrapper)
371361)
372362"""
363+ strict-imports = false
373364
374365[tool .ruff ]
375- include = [
376- " {litestar,tests,docs,test_apps,tools}/**/*.{py,pyi}" ,
377- " pyproject.toml"
378- ]
366+ include = [" {litestar,tests,docs,test_apps,tools}/**/*.{py,pyi}" , " pyproject.toml" ]
379367
380368lint.select = [
381- " A" , # flake8-builtins
382- " B" , # flake8-bugbear
369+ " A" , # flake8-builtins
370+ " B" , # flake8-bugbear
383371 " BLE" , # flake8-blind-except
384- " C4" , # flake8-comprehensions
372+ " C4" , # flake8-comprehensions
385373 " C90" , # mccabe
386- " D" , # pydocstyle
387- " DJ" , # flake8-django
374+ " D" , # pydocstyle
375+ " DJ" , # flake8-django
388376 " DTZ" , # flake8-datetimez
389- " E" , # pycodestyle errors
377+ " E" , # pycodestyle errors
390378 " ERA" , # eradicate
391379 " EXE" , # flake8-executable
392- " F" , # pyflakes
393- " G" , # flake8-logging-format
394- " I" , # isort
380+ " F" , # pyflakes
381+ " G" , # flake8-logging-format
382+ " I" , # isort
395383 " ICN" , # flake8-import-conventions
396384 " ISC" , # flake8-implicit-str-concat
397- " N" , # pep8-naming
385+ " N" , # pep8-naming
398386 " PIE" , # flake8-pie
399387 " PLC" , # pylint - convention
400388 " PLE" , # pylint - error
401389 " PLW" , # pylint - warning
402390 " PTH" , # flake8-use-pathlib
403- " Q" , # flake8-quotes
391+ " Q" , # flake8-quotes
404392 " RET" , # flake8-return
405393 " RUF" , # Ruff-specific rules
406- " S" , # flake8-bandit
394+ " S" , # flake8-bandit
407395 " SIM" , # flake8-simplify
408396 " T10" , # flake8-debugger
409397 " T20" , # flake8-print
410- " TC" , # flake8-type-checking
398+ " TC" , # flake8-type-checking
411399 " TID" , # flake8-tidy-imports
412- " UP" , # pyupgrade
413- " W" , # pycodestyle - warning
400+ " UP" , # pyupgrade
401+ " W" , # pycodestyle - warning
414402 " YTT" , # flake8-2020
415403]
416404
417405line-length = 120
418406lint.ignore = [
419- " A003" , # flake8-builtins - class attribute {name} is shadowing a python builtin
420- " B010" , # flake8-bugbear - do not call setattr with a constant attribute value
421- " D100" , # pydocstyle - missing docstring in public module
422- " D101" , # pydocstyle - missing docstring in public class
423- " D102" , # pydocstyle - missing docstring in public method
424- " D103" , # pydocstyle - missing docstring in public function
425- " D104" , # pydocstyle - missing docstring in public package
426- " D105" , # pydocstyle - missing docstring in magic method
427- " D106" , # pydocstyle - missing docstring in public nested class
428- " D107" , # pydocstyle - missing docstring in __init__
429- " D202" , # pydocstyle - no blank lines allowed after function docstring
430- " D205" , # pydocstyle - 1 blank line required between summary line and description
431- " D415" , # pydocstyle - first line should end with a period, question mark, or exclamation point
432- " E501" , # pycodestyle line too long, handled by ruff format
407+ " A003" , # flake8-builtins - class attribute {name} is shadowing a python builtin
408+ " B010" , # flake8-bugbear - do not call setattr with a constant attribute value
409+ " D100" , # pydocstyle - missing docstring in public module
410+ " D101" , # pydocstyle - missing docstring in public class
411+ " D102" , # pydocstyle - missing docstring in public method
412+ " D103" , # pydocstyle - missing docstring in public function
413+ " D104" , # pydocstyle - missing docstring in public package
414+ " D105" , # pydocstyle - missing docstring in magic method
415+ " D106" , # pydocstyle - missing docstring in public nested class
416+ " D107" , # pydocstyle - missing docstring in __init__
417+ " D202" , # pydocstyle - no blank lines allowed after function docstring
418+ " D205" , # pydocstyle - 1 blank line required between summary line and description
419+ " D415" , # pydocstyle - first line should end with a period, question mark, or exclamation point
420+ " E501" , # pycodestyle line too long, handled by ruff format
433421 " PLW2901" , # pylint - for loop variable overwritten by assignment target
434- " RUF012" , # Ruff-specific rule - annotated with classvar
435- " ISC001" , # Ruff formatter incompatible
436- " CPY001" , # ruff - copyright notice at the top of the file
422+ " RUF012" , # Ruff-specific rule - annotated with classvar
423+ " ISC001" , # Ruff formatter incompatible
424+ " CPY001" , # ruff - copyright notice at the top of the file
437425]
438426src = [" litestar" , " tests" , " docs/examples" ]
439427target-version = " py38"
@@ -462,8 +450,8 @@ known-first-party = ["litestar", "tests", "examples"]
462450"docs/examples/**" = [" T201" ]
463451"docs/examples/application_hooks/before_send_hook.py" = [" UP006" ]
464452"docs/examples/contrib/sqlalchemy/plugins/**/*.*" = [" UP006" ]
465- "docs/examples/data_transfer_objects**/*.*" = [" UP006" ]
466453"docs/examples/contrib/sqlalchemy/sqlalchemy_declarative_models.py" = [" UP006" ]
454+ "docs/examples/data_transfer_objects**/*.*" = [" UP006" ]
467455"litestar/_openapi/schema_generation/schema.py" = [" C901" ]
468456"litestar/exceptions/*.*" = [" N818" ]
469457"litestar/handlers/**/*.*" = [" N801" ]
@@ -496,9 +484,9 @@ known-first-party = ["litestar", "tests", "examples"]
496484 " E721" ,
497485]
498486"tests/unit/test_contrib/test_sqlalchemy/**/*.*" = [" UP006" ]
487+ "tests/unit/test_openapi/test_typescript_converter/test_converter.py" = [" W293" ]
499488"tools/**/*.*" = [" D" , " ARG" , " EM" , " TRY" , " G" , " FBT" ]
500489"tools/prepare_release.py" = [" S603" , " S607" ]
501- "tests/unit/test_openapi/test_typescript_converter/test_converter.py" = [" W293" ]
502490
503491[tool .ruff .format ]
504492docstring-code-format = true
0 commit comments