| 1 |
# Build system requirements. |
| 2 |
[build-system] |
| 3 |
requires = ["flit_core >=3.11,<4"] |
| 4 |
build-backend = "flit_core.buildapi" |
| 5 |
|
| 6 |
# Project metadata |
| 7 |
[project] |
| 8 |
name = "typing_extensions" |
| 9 |
version = "4.16.0" |
| 10 |
description = "Backported and Experimental Type Hints for Python 3.9+" |
| 11 |
readme = "README.md" |
| 12 |
requires-python = ">=3.9" |
| 13 |
license = "PSF-2.0" |
| 14 |
license-files = ["LICENSE"] |
| 15 |
keywords = [ |
| 16 |
"annotations", |
| 17 |
"backport", |
| 18 |
"checker", |
| 19 |
"checking", |
| 20 |
"function", |
| 21 |
"hinting", |
| 22 |
"hints", |
| 23 |
"type", |
| 24 |
"typechecking", |
| 25 |
"typehinting", |
| 26 |
"typehints", |
| 27 |
"typing", |
| 28 |
] |
| 29 |
# Classifiers list: https://pypi.org/classifiers/ |
| 30 |
classifiers = [ |
| 31 |
"Development Status :: 5 - Production/Stable", |
| 32 |
"Environment :: Console", |
| 33 |
"Intended Audience :: Developers", |
| 34 |
"Operating System :: OS Independent", |
| 35 |
"Programming Language :: Python :: 3", |
| 36 |
"Programming Language :: Python :: 3 :: Only", |
| 37 |
"Programming Language :: Python :: 3.9", |
| 38 |
"Programming Language :: Python :: 3.10", |
| 39 |
"Programming Language :: Python :: 3.11", |
| 40 |
"Programming Language :: Python :: 3.12", |
| 41 |
"Programming Language :: Python :: 3.13", |
| 42 |
"Programming Language :: Python :: 3.14", |
| 43 |
"Programming Language :: Python :: 3.15", |
| 44 |
"Topic :: Software Development", |
| 45 |
] |
| 46 |
|
| 47 |
[project.urls] |
| 48 |
Home = "https://github.com/python/typing_extensions" |
| 49 |
Repository = "https://github.com/python/typing_extensions" |
| 50 |
Changes = "https://github.com/python/typing_extensions/blob/main/CHANGELOG.md" |
| 51 |
Documentation = "https://typing-extensions.readthedocs.io/" |
| 52 |
"Bug Tracker" = "https://github.com/python/typing_extensions/issues" |
| 53 |
"Q & A" = "https://github.com/python/typing/discussions" |
| 54 |
|
| 55 |
# Project metadata -- authors. Flit stores this as a list of dicts, so it can't |
| 56 |
# be inline above. |
| 57 |
[[project.authors]] |
| 58 |
name = "Guido van Rossum, Jukka Lehtosalo, Ćukasz Langa, Michael Lee" |
| 59 |
email = "[email protected]" |
| 60 |
|
| 61 |
[tool.flit.sdist] |
| 62 |
include = ["CHANGELOG.md", "README.md", "tox.ini", "*/*test*.py"] |
| 63 |
exclude = [] |
| 64 |
|
| 65 |
[tool.ruff] |
| 66 |
line-length = 90 |
| 67 |
target-version = "py39" |
| 68 |
|
| 69 |
[tool.ruff.lint] |
| 70 |
select = [ |
| 71 |
"B", |
| 72 |
"C4", |
| 73 |
"E", |
| 74 |
"F", |
| 75 |
"I", |
| 76 |
"ISC001", |
| 77 |
"PGH004", |
| 78 |
"RUF", |
| 79 |
"SIM201", |
| 80 |
"SIM202", |
| 81 |
"UP", |
| 82 |
"W", |
| 83 |
] |
| 84 |
|
| 85 |
ignore = [ |
| 86 |
# Ignore various "modernization" rules that tell you off for importing/using |
| 87 |
# deprecated things from the typing module, etc. |
| 88 |
"UP006", |
| 89 |
"UP007", |
| 90 |
"UP013", |
| 91 |
"UP014", |
| 92 |
"UP019", |
| 93 |
"UP035", |
| 94 |
"UP045", # X | None instead of Optional[X] |
| 95 |
# Not relevant here |
| 96 |
"RUF012", # Use ClassVar for mutables |
| 97 |
"RUF022", # Unsorted __all__ |
| 98 |
"RUF023", # Unsorted __slots__ |
| 99 |
"B903", # Use dataclass / namedtuple |
| 100 |
"RUF031", # parentheses for tuples in subscripts |
| 101 |
# Ruff doesn't understand the globals() assignment; we test __all__ |
| 102 |
# directly in test_all_names_in___all__. |
| 103 |
"F822", |
| 104 |
] |
| 105 |
|
| 106 |
[tool.ruff.lint.per-file-ignores] |
| 107 |
"!src/typing_extensions.py" = [ |
| 108 |
"B018", |
| 109 |
"B024", |
| 110 |
"C4", |
| 111 |
"E302", |
| 112 |
"E306", |
| 113 |
"E501", |
| 114 |
"E701", |
| 115 |
# Harmful for tests if applied. |
| 116 |
"RUF036", # None not at end of Union |
| 117 |
"RUF041", # nested Literal |
| 118 |
] |
| 119 |
|
| 120 |
[tool.ruff.lint.isort] |
| 121 |
extra-standard-library = ["tomllib"] |
| 122 |
known-first-party = ["typing_extensions", "_typed_dict_test_helper"] |
| 123 |
|
| 124 |
[tool.coverage.report] |
| 125 |
fail_under = 96 |
| 126 |
precision = 2 |
| 127 |
show_missing = true |
| 128 |
# Omit files that are created in temporary directories during tests. |
| 129 |
# If not explicitly omitted they will result in warnings in the report. |
| 130 |
omit = ["inspect*", "ann*"] |
| 131 |
ignore_errors = true |
| 132 |
exclude_also = [ |
| 133 |
# Exclude placeholder function and class bodies. |
| 134 |
'^\s*((async )?def|class) .*:\n\s*(pass|raise NotImplementedError)', |
| 135 |
] |