-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathpyproject.toml
81 lines (66 loc) · 2.11 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
# Notes on how to do a release.
#
# * Write release notes in docs/releasenotes.txt
# * Bump `__version__` and commit.
# * git tag vx.y
# * git push origin main vx.y
# * flit publish
# ===== Project info
[project]
dynamic = ["version"]
name = "pscript"
description = "Python to JavaScript compiler."
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "Almar Klein" }]
keywords = ["Python", "JavaScript", "compiler", "transpiler", "parser"]
requires-python = ">= 3.6"
dependencies = []
[project.optional-dependencies]
lint = ["ruff"]
tests = ["pytest"]
docs = ["sphinx", "sphinx_rtd_theme"]
dev = ["pscript[lint,tests, docs]"]
[project.urls]
Homepage = "https://github.com/flexxui/pscript"
Documentation = "http://pscript.readthedocs.io"
Repository = "https://github.com/flexxui/pscript"
# ===== Building
# Flit is great solution for simple pure-Python projects.
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
# ===== Tooling
[tool.ruff]
line-length = 88
exclude = ["tests/python_sample.py", "tests/python_sample3.py"]
[tool.ruff.lint]
select = ["F", "E", "W", "B", "RUF"]
ignore = [
"W291", # Trailing whitespace
"E501", # Line too long
"E731", # Do not assign a `lambda` expression, use a `def`
"RUF005", # Consider iterable unpacking instead of concatenation
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"RUF023", # __slots__ is not sorted -> our classes rely on slot order
]
[tool.coverage.report]
exclude_also = [
# Have to re-enable the standard pragma, plus a less-ugly flavor
"pragma: no cover",
"no-cover",
"raise NotImplementedError",
"raise AssertionError",
"raise JSError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if False:",
"if __name__ == .__main__.:",
"if this_is_js():",
# Don't complain for platform specific code
"sys\\.platform.startswith\\(\\'win\\'\\)",
"sys\\.platform.startswith\\(\\'darwin\\'\\)",
"getattr\\(sys, \\'frozen\\'\\,\\ None\\)",
# Don't complain about caught import fails
"except ImportError:",
]