-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (136 loc) · 4.04 KB
/
Copy pathpyproject.toml
File metadata and controls
148 lines (136 loc) · 4.04 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "oslash"
version = "2.0.0"
description = "Functional library for Functors, Applicatives, and Monads in Python 3.12+"
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Dag Brattli", email = "dag@brattli.net" }
]
maintainers = [
{ name = "Dag Brattli", email = "dag@brattli.net" }
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
requires-python = ">=3.12"
dependencies = []
[project.urls]
Homepage = "https://github.com/dbrattli/oslash"
Repository = "https://github.com/dbrattli/oslash"
"Bug Tracker" = "https://github.com/dbrattli/oslash/issues"
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=4.0",
"ruff>=0.14.5",
"pyright>=1.1.407",
"pre-commit>=3.0",
]
[tool.hatchling.build.targets.wheel]
packages = ["oslash"]
[tool.hatchling.build.targets.sdist]
include = [
"/oslash",
"/tests",
"/LICENSE",
"/README.md",
"/pyproject.toml",
]
[tool.ruff]
line-length = 120
target-version = "py312"
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"YTT", # flake8-2020
"ASYNC", # flake8-async
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PL", # Pylint
"RUF", # Ruff-specific rules
]
ignore = [
"E731", # Do not assign a lambda expression, use a def
"PT009", # Use a regular assert instead of unittest-style assertions
"PLR2004", # Magic value used in comparison (OK in tests)
"PLW1641", # Object does not implement __hash__ method (intentional for monads)
"A002", # Argument shadowing builtin (next parameter in monad operators)
"SIM108", # Use ternary operator (less readable for complex conditions)
"E741", # Ambiguous variable name (l is common in FP for list constructors)
"B904", # raise from in except clause (test code simplification)
"N806", # Variable naming in tests (dynamically created types)
"PLC3002", # Lambda called directly (intentional in test comparisons)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pyright]
pythonVersion = "3.12"
pythonPlatform = "All"
typeCheckingMode = "strict"
reportUnknownMemberType = "error"
reportUnknownArgumentType = "error"
reportUnknownVariableType = "error"
reportMissingTypeStubs = "warning"
reportPrivateUsage = "warning"
reportConstantRedefinition = "error"
reportIncompatibleMethodOverride = "error"
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
include = ["oslash"]
exclude = ["**/__pycache__", "**/.venv", "**/node_modules"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--cov=oslash",
"--cov-report=term-missing",
"--cov-report=xml",
]
[tool.coverage.run]
source = ["oslash"]
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
]