forked from abmind-community/contrib-practice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (100 loc) · 2.69 KB
/
Copy pathpyproject.toml
File metadata and controls
110 lines (100 loc) · 2.69 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "contrib-practice"
license = { text = "MIT" }
requires-python = ">=3.10"
authors = [
{ name = "Boyu Wang", email = "bwang44@buffalo.edu" },
]
readme = "README.md"
dependencies = []
dynamic = ["version"]
[project.optional-dependencies]
all = ["contrib-practice[dev]"]
dev = [
"pre-commit",
"ruff",
"coverage",
"pytest >= 4.6",
"pytest-cov",
]
[project.urls]
homepage = "https://github.com/abmind-community/contrib-practice"
repository = "https://github.com/abmind-community/contrib-practice"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.hatch.version]
path = "src/__init__.py"
[tool.pytest.ini_options]
addopts = "-ra -q"
testpaths = [
"tests",
]
[tool.ruff]
line-length = 88
target-version = "py310"
lint.select = [
# "ANN", # annotations TODO
"B", # bugbear
"C4", # comprehensions
"DTZ", # naive datetime
"E", # style errors
"F", # flakes
"I", # import sorting
"ISC", # string concatenation
"N", # naming
"PGH", # pygrep-hooks
"PIE", # miscellaneous
"PLC", # pylint convention
"PLE", # pylint error
# "PLR", # pylint refactor TODO
"PLW", # pylint warning
"Q", # quotes
"RUF", # Ruff
"S", # security
"SIM", # simplify
"T10", # debugger
"UP", # upgrade
"W", # style warnings
"YTT", # sys.version
]
lint.extend-ignore = [
"E501",
"S101", # Use of `assert` detected
"B017", # `assertRaises(Exception)` should be considered evil TODO
"PGH004", # Use specific rule codes when using `noqa` TODO
"B905", # `zip()` without an explicit `strict=` parameter
"N802", # Function name should be lowercase
"N999", # Invalid module name. We should revisit this in the future, TODO
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` TODO
"S310", # Audit URL open for permitted schemes. Allowing use of `file:` or custom schemes is often unexpected.
"S603", # `subprocess` call: check for execution of untrusted input
"ISC001", # ruff format asks to disable this feature
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
extend-exclude = ["tasks"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
check_untyped_defs = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"raise ImportError",
]
ignore_errors = true
omit = [
"tests/*",
"setup.py",
]