-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
150 lines (128 loc) · 4.14 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
149
150
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[template.plugins.default]
src-layout = true
[tool.setuptools.package-data]
"configurablejson" = ["py.typed"]
[tool.hatch.build.targets.wheel]
packages = ["src/configurablejson"]
[project]
name = "Configurable-JSON"
dynamic = ["version"]
description = 'Easily Extend the JSON Encoder with Custom Rules'
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
keywords = []
authors = [
{ name = "Robin van der Noord", email = "contact@trialandsuccess.nl" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"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",
]
dependencies = []
[project.urls]
Documentation = "https://github.com/trialandsuccess/configurablejson#readme"
Issues = "https://github.com/trialandsuccess/configurablejson/issues"
Source = "https://github.com/trialandsuccess/configurablejson"
[project.optional-dependencies]
dev = [
"su6[all]",
"hatch",
]
[tool.hatch.version]
path = "src/configurablejson/__about__.py"
[tool.semantic_release]
branch = "master"
version_variable = "src/configurablejson/__about__.py:__version__"
change_log = "CHANGELOG.md"
upload_to_repository = false
upload_to_release = false
build_command = "hatch build"
[tool.su6]
directory = "src"
include = []
exclude = ["pytest"]
stop-after-first-failure = true
[tool.black]
target-version = ["py311"]
line-length = 120
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
(
^.*\.bak\/.+ # ignore every .bak directory
^.*venv.+\/.+ # ignore every venv directory
venv.+|.+\.bak # idk why it suddenly works, let's not touch it
)
'''
[tool.mypy]
python_version = "3.11"
# `some: int = None` looks nicer than `some: int | None = None` and pycharm still understands it
no_implicit_optional = false # I guess 'strict_optional' should be true, but disable this one because it's double!
# same as above (thrown if no_implicit_optional = False)
# ACTUALLY: not the same! Setting strict_optional = false may miss some type errors like
# 'Item "None" of "Optional" has no attribute "lower"'
# 'strict_optional' complains more for class properties and 'no_implicit_optional' for function arguments
# strict_optional = false
# 3rd party packages may not be typed, that's not my fault!
ignore_missing_imports = true
# kinda hypocritical to disable Optional and still enable strict, but I do agree with some other strict rules.
strict = true
# fixes defs with clear return var (doesn't seem to work for __init__ which is the most obvious case)
# check_untyped_defs = True
exclude = ["venv", ".bak"]
[tool.ruff]
target-version = "py311"
line-length = 120
select = [
"F", # pyflake error
"E", # pycodestyle error
"W", # pycodestyle warning
"Q", # quotes
"A", # builtins
# "C4", # comprehensions - NO: doesn't allow dict()
# "RET", # return - NO: annoying
"SIM", # simplify
"ARG", # unused arguments
# "COM", # comma's - NO: annoying
# "PTH", # use pathlib - NO: annoying
"RUF", # ruff rules
]
unfixable = [
# Don't touch unused imports
"F401",
]
extend-exclude = ["*.bak/", "venv*/"]
ignore = [
"RUF013" # implicit Optional
]
[tool.bandit]
# bandit -c pyproject.toml -r .
exclude_dirs = [".bak", "venv"]
skips = [
"B108", # hard coded /tmp/... files are fine for me tbh
]
[tool.isort]
profile = "black"
extend_skip_glob = ["*.bak/*"]
[tool.pydocstyle]
convention = "google"
match-dir = '(?!venv)[^\.].*'
add_select = [
"D213", # = Multi-line docstring summary should start at the second line
"D416", # = Google-style section name checks.
"D417", # = Missing argument descriptions in the docstring
]
add_ignore = [
"D200", # = One-line docstring should fit on one line with quotes
"D212", # = Multi-line docstring summary should start at the first line
]