-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (113 loc) · 4.28 KB
/
Copy pathpyproject.toml
File metadata and controls
125 lines (113 loc) · 4.28 KB
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
[build-system]
requires = ["setuptools>=84.0.0"]
build-backend = "setuptools.build_meta"
[project]
name = "mos65xx"
description = "Interpreters for the 65xx family, every model, held to per-opcode conformance suites."
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.12"
dynamic = ["version"]
keywords = ["65816", "65c816", "6502", "emulator", "interpreter", "snes", "conformance"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: System :: Emulators",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://github.com/gufranco/mos65xx-python"
Source = "https://github.com/gufranco/mos65xx-python"
Issues = "https://github.com/gufranco/mos65xx-python/issues"
[project.scripts]
mos65xx-doctor = "mos65xx.doctor:main"
[tool.setuptools]
packages = ["mos65xx"]
[tool.setuptools.dynamic]
version = { attr = "mos65xx.version.VERSION" }
[tool.setuptools.exclude-package-data]
mos65xx = ["*.test.py"]
[tool.ruff]
target-version = "py312"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM", "RUF", "PL", "BLE", "C4", "N", "A", "T20", "PTH"]
ignore = [
"PLR0913",
"PLR2004",
"PLR0912",
"PLR0915",
"PLR0911",
"PLC0415",
"PLR0917",
"E501",
# N818 wants every exception to end in Error. Three of these are control flow
# signals rather than failures, and CPython names its own that way:
# StopIteration, SystemExit and GeneratorExit carry no suffix either. The
# exceptions here that genuinely report a failure do end in Error.
"N818",
]
[tool.ruff.lint.per-file-ignores]
# The environment checks are the same shape and exist for the same reason: they
# report what a machine is, so a check that throws has to become a line in the
# report rather than end the run, and its output is the product.
"mos65xx/environment.py" = ["BLE001", "T201"]
# A test file sits beside the module it covers and is named after it, so its
# module name carries a dot that N999 rejects. The layout is deliberate: a
# module and its tests are read together.
"*.test.py" = ["PLR2004", "N999"]
# These are command line tools. Printing is their output, not a stray debug
# statement left behind, and routing it through a logger would put a level and
# a timestamp in front of a report meant to be read by a person.
"conformance/*.py" = ["T201"]
# The doctor exists so that nothing fails silently, which means it has to survive
# whatever a check throws at it and report that rather than propagate it. A
# narrower catch here would let an unforeseen failure escape as a traceback and
# take the rest of the report with it, which is the one outcome it must avoid.
# It prints for the same reason every tool here does: its output is the product.
"mos65xx/doctor.py" = ["BLE001", "T201"]
[tool.mypy]
# Every flag mypy has, plus the ones strict does not turn on. This is a processor
# core: masked integers, flag bits and addressing modes from end to end, and the
# errors that matter are the ones where a width or a None crosses a boundary.
strict = true
python_version = "3.12"
warn_unreachable = true
warn_no_return = true
strict_equality = true
extra_checks = true
enable_error_code = [
"explicit-override",
"ignore-without-code",
"possibly-undefined",
"redundant-expr",
"truthy-bool",
"truthy-iterable",
"unused-awaitable",
]
files = ["mos65xx", "conformance"]
[tool.coverage.run]
source = ["mos65xx", "conformance"]
branch = true
[tool.coverage.report]
fail_under = 100
show_missing = true
exclude_also = [
# The command line guard hands argv to a function that is itself tested, so
# there is nothing behind it left to exercise. Importing the module to cover
# the guard would run the tool rather than test it.
'if __name__ == "__main__":',
# A type checking block never runs, by definition. Python 3.14 drops it before
# coverage can see it and earlier versions do not, so leaving it in would make
# the gate mean one thing on the newest runtime and another on the oldest
# supported one.
'if TYPE_CHECKING:',
# A protocol method has no body to run, whether the ellipsis sits on its own
# line or after the signature. The same version split applies.
'^\s*\.\.\.$',
': \.\.\.$',
]