-
Notifications
You must be signed in to change notification settings - Fork 53
/
pyproject.toml
148 lines (130 loc) · 5.23 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
142
143
144
145
146
147
148
[project]
name = "curses-menu"
version = "0.9.0"
description = "A simple console menu system using curses"
authors = [
{ name = "Paul Barrett", email = "[email protected]" },
]
readme = "README.rst"
requires-python = ">=3.9"
dependencies = [
"windows-curses>=2.3.3 ; platform_system == 'Windows'",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Environment :: Console :: Curses",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[project.urls]
Homepage = "http://github.com/pmbarrett314/curses-menu"
Documentation = "https://curses-menu.readthedocs.io/en/latest/"
Repository = "http://github.com/pmbarrett314/curses-menu"
Issues = "https://github.com/pmbarrett314/curses-menu/issues"
Changelog = "https://github.com/pmbarrett314/curses-menu/blob/master/CHANGELOG.rst"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
line-length = 88
extend-exclude = ["examples/*", "stubs/*"]
# Don't be pedantic about types and documentation in tests. Assume tests can access private members
# conftest.py has some nested withs for clarity, don't complain about that.
target-version = "py39"
fix = true
[tool.ruff.lint]
select = ["ALL"]
extend-ignore = ["D", "PD", "TD", "S101", "ANN101", "ANN102", "UP015", "RET505", "PLR2004", "PLR0913", "PLR0915", "PLC1901", "S602", "S605", "S607", "FIX002", 'COM812', 'COM819', 'E501', 'ISC001', 'Q000', 'Q001', 'Q002', 'Q003', 'W191']
# DTZ (flake8-datetimez): shouldn't matter
# ERA (eradicate) currently passes byt if it becomes an issue I might disable it
# D (pydocstyle): not ready to commit to this yet
# PD (pandas-vet): not using pandas
# TD (flake8-todos): currently don't really care to have exactly formatted todos
# S101 (assert used): ignored because we use assert for type narrowing and tests
# ANN101 (no self annotation): ignored because self annotations feel redundant
# ANN102 (no cls annotation): ignored because cls annotations also feel redundant
# U015 (redundant open mode): I like open("foo.txt", "r")
# RET505 (superfluous else return) I disagree with this, I think the explicit else adds clarity.
# Similar hooks not disabled currently because they don't apply.
# PLR2004 interesting ideas about magic constants, but a little too aggressive
# PLR0913 and PLR0915 are a little too opinionated for my tastes
# PLC1901 (prefer comparing strings using falsiness) disabled because I prefer the explcit comparison
# S60X (possible security issues with subrpocess) these need more investigation.
# FIX002 (flake8-fix me to do comments): TO DO comments are okay
# 'COM812', 'COM819', 'E501', 'ISC001', 'Q000', 'Q001', 'Q002', 'Q003', 'W191' ignored by ruff format reccomendation
per-file-ignores = { "test/*" = ["ANN", "D", "SLF001"], "test/conftest.py" = ["SIM117"], "docs/*" = ["INP001"] }
fixable = ["I"]
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"pragma: no cover all",
"@overload",
]
[tool.coverage.run]
source = ['test', 'cursesmenu']
omit = ["cursesmenu/old_curses_menu.py", ".tox"]
branch = true
data_file = ".cov/.coverage"
plugins = ["coverage_conditional_plugin"]
[tool.coverage.lcov]
output = ".cov/coverage.lcov"
[tool.coverage.coverage_conditional_plugin.rules]
no-cover-nonwindows = "not sys.platform.startswith('win')"
no-cover-windows = "sys.platform.startswith('win')"
[tool.pytest.ini_options]
required_plugins = ["pytest-cov"]
addopts = ["-Werror", "-vv", "--cov", "--cov-append", "--cov-report=term-missing", "--cov-report=xml:.cov/coverage.xml", "--cov-fail-under=100", "--no-cov-on-fail"]
[tool.pydocstyle]
add_ignore = "D105"
match = "(?!__init__.py|^(docs/|test/|examples/|setup.py|conftest.py))"
[tool.mypy]
exclude = "^(scratch/|examples/)"
warn_unused_configs = true
warn_redundant_casts = true
[[tool.mypy.overrides]]
module = "cursesmenu"
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
strict_concatenate = true
[tool.uv]
dev-dependencies = [
"sphinx<=9.0.0; python_version >='3.10'",
"sphinx-rtd-theme==3.0.0rc1; python_version >= '3.10'",
"sphinx-autodoc-typehints<3.0.0; python_version>='3.10'",
"pytest<9.0.0",
"tox<5.0.0",
"tox-uv<2.0.0",
"pyte<0.8.2",
"pexpect<5.0.0",
"coverage[toml]<8",
"pytest-cov<6.0.0",
"coverage-conditional-plugin<0.10.0",
"mypy<1.12.0",
"ruff == 0.6.4"
]
[tool.hatch.build.targets.wheel]
packages = ["cursesmenu"]