-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
pyproject.toml
142 lines (126 loc) · 2.66 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
[tool.poetry]
name = "zxbasic"
version = "1.17.3"
description = "Boriel's ZX BASIC Compiler"
authors = ["Jose Rodriguez <boriel@gmail.com>"]
license = "AGPL-3.0-or-later"
documentation = "https://zxbasic.readthedocs.io"
repository = "https://github.com/boriel/zxbasic"
homepage = "http://zxbasic.net"
readme = "README.md"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Programming Language :: Python :: 3.12',
]
keywords = ['compiler', 'zxspectrum', 'BASIC', 'z80'] # arbitrary keywords
packages = [
{ include = "src/**/*" }
]
[tool.poetry.scripts]
zxb = 'src.libzxbc.zxb:main'
zxbc = 'src.libzxbc.zxb:main'
zxbasm = 'src.libzxbasm.zxbasm:main'
zxbpp = 'src.libzxbpp.zxbpp:entry_point'
[tool.poetry.dependencies]
python = "^3.12"
[tool.poetry.group.dev.dependencies]
pytest = "*"
bump2version = "^1.0.0"
pre-commit = "*"
mkdocs = "^1.2.2"
poethepoet = "*"
pytest-cov = "*"
ruff = "*"
mypy = "^1.8.0"
pytest-xdist = "*"
setuptools = "^70.1.1"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
[tool.poe.tasks]
[[tool.poe.tasks.lint]]
help = "Check code style and typing..."
shell = """
ruff check . &&
ruff format --check . &&
mypy .
"""
[[tool.poe.tasks.test]]
help = "Run tests"
shell = "pytest tests"
[[tool.poe.tasks.test-no-cov]]
help = "Run tests faster (with no coverage)"
shell = "pytest tests --no-cov"
[[tool.poe.tasks.format]]
help = "Formats code"
shell = """
ruff check --select I --fix .
ruff format .
"""
[tool.coverage.run]
branch = true
omit = [
"tests/*",
"src/ply/*"
]
[tool.pytest.ini_options]
minversion = "6.0"
norecursedirs = ["test_*tmp", "runtime"]
addopts = "--cov=src -n auto --dist=loadgroup --color=yes"
[tool.mypy]
check_untyped_defs = true
disable_error_code = [
"arg-type",
"assignment",
"attr-defined",
"call-overload",
"import-not-found",
"list-item",
"misc",
"name-defined",
"operator",
"union-attr",
"var-annotated",
]
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [
"C4",
"E",
"F",
"I",
"PLR",
"RUF",
"UP",
]
ignore = [
"E713",
"E722",
"E731",
"E741",
"PLR0124",
"PLR0911",
"PLR0912",
"PLR0913",
"PLR0915",
"PLR1714",
"PLR1722",
"PLR1730",
"PLR2004",
"PLR5501",
"RUF005",
"RUF012",
"RUF013",
"UP008",
"UP015", # KEEP: redundant-open-modes
"UP024",
"UP028",
"UP030",
"UP031",
"UP038",
]