-
Notifications
You must be signed in to change notification settings - Fork 27
/
pyproject.toml
141 lines (123 loc) · 3.83 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "src/tyro/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/tyro"]
[project]
name = "tyro"
authors = [
{name = "brentyi", email = "[email protected]"},
]
description = "CLI interfaces & config objects, from types"
dynamic = ["version"]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
]
dependencies = [
"typeguard>=4.0.0",
"docstring-parser>=0.16",
"typing-extensions>=4.9.0; python_version>='3.8'",
"typing-extensions>=4.7.0; python_version<'3.8'",
"backports.cached-property>=1.0.2; python_version<'3.8'",
"colorama>=0.4.0; platform_system=='Windows'",
"rich>=11.1.0",
"shtab>=1.5.6",
"eval_type_backport>=0.1.3; python_version<'3.10'",
]
[project.optional-dependencies]
dev = [
"PyYAML>=6.0",
"frozendict>=2.3.4",
"pytest>=7.1.2",
"pytest-cov>=3.0.0",
"omegaconf>=2.2.2",
"attrs>=21.4.0",
"torch>=1.10.0;python_version<='3.12'",
"pyright>=1.1.349,!=1.1.379",
"ruff>=0.1.13",
"mypy>=1.4.1",
"numpy>=1.20.0",
# As of 7/27/2023, flax install fails for Python 3.7 without pinning to an
# old version. But doing so breaks other Python versions.
"flax>=0.6.9;python_version>='3.8' and python_version<='3.12'",
"pydantic>=2.5.2,!=2.10.0",
"coverage[toml]>=6.5.0",
"eval_type_backport>=0.1.3",
]
[project.urls]
"GitHub" = "https://github.com/brentyi/tyro"
[tool.mypy]
python_version = "3.12"
ignore_missing_imports = true
warn_unused_configs = true
exclude = ["^tests/test_py311_generated/.*", "_argparse\\.py"]
[tool.coverage.run]
omit = ["**/_argparse.py"]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't compute coverage for abstract methods, properties
"@abstract",
"@abc\\.abstract",
# or warnings
"warnings",
# or empty function bodies
"pass",
"\\.\\.\\.",
# or typing imports
"TYPE_CHECKING",
# or assert statements & errors
"assert",
"raise AssertionError",
# or anything that's not implemented
"NotImplementedError()",
# or fallback imports
"except ImportError:",
# or anything that's deprecated
"deprecated"
]
[tool.ruff]
src = ["src"] # Needed to recognize first-party import location in GitHub action.
lint.select = [
"E", # pycodestyle errors.
"F", # Pyflakes rules.
"PLC", # Pylint convention warnings.
"PLE", # Pylint errors.
"PLR", # Pylint refactor recommendations.
"PLW", # Pylint warnings.
"I" # Import sorting.
]
lint.ignore = [
"E741", # Ambiguous variable name. (l, O, or I)
"E501", # Line too long.
"E731", # Do not assign a lambda expression, use a def.
"PLR2004", # Magic value used in comparison.
"PLR0915", # Too many statements.
"PLR0913", # Too many arguments.
"PLC0414", # Import alias does not rename variable. (this is used for exporting names)
"PLC1901", # Use falsey strings.
"PLR5501", # Use `elif` instead of `else if`.
"PLR0911", # Too many return statements.
"PLR0912", # Too many branches.
"PLW0603", # Global statement updates are discouraged.
"PLW2901" # For loop variable overwritten.
]
extend-exclude = ["**/_argparse.py"]
[tool.pyright]
pythonVersion = "3.12"
ignore = ["**/_argparse.py", "./docs/**/*"]