-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (142 loc) · 4.37 KB
/
pyproject.toml
File metadata and controls
151 lines (142 loc) · 4.37 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
149
150
151
[build-system]
build-backend = "uv_build"
requires = [ "uv-build~=0.10.0" ]
[project]
name = "openfeature-sdk"
version = "0.8.4"
description = "Standardizing Feature Flagging for Everyone"
readme = "README.md"
keywords = [
"feature",
"flags",
"openfeature",
"toggles",
]
license = "Apache-2.0"
license-files = [ "LICENSE" ]
authors = [ { name = "OpenFeature", email = "openfeature-core@groups.io" } ]
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = []
urls.Homepage = "https://github.com/open-feature/python-sdk"
[dependency-groups]
dev = [
"behave>=1.3.0,<2.0.0",
"coverage[toml]>=7.10.0,<8.0.0",
"poethepoet>=0.40.0,<1.0.0",
"prek>=0.3.0,<0.4.0",
"pytest>=9.0.0,<10.0.0",
"pytest-asyncio>=1.3.0,<2.0.0",
]
[tool.uv]
required-version = "~=0.10.0"
build-backend.module-name = "openfeature"
build-backend.module-root = ""
build-backend.namespace = true
[tool.ruff]
target-version = "py310"
exclude = [
".git",
".venv",
"__pycache__",
"spec",
"venv",
]
lint.select = [
"A",
"B",
"C4",
"C90",
"E",
"F",
"FLY",
"FURB",
"I",
"ICN003",
"LOG",
"N",
"PERF",
"PGH",
"PLC",
"PLR0913",
"PLR0915",
"RUF",
"S",
"SIM",
"T10",
"T20",
"TID251",
"UP",
"W",
"YTT",
]
lint.ignore = [
"E501", # the formatter will handle any too long line
]
lint.per-file-ignores."tests/**/*" = [ "PLR0913", "S101" ]
lint.flake8-import-conventions.banned-from = [ "typing" ]
lint.flake8-tidy-imports.banned-api."typing.Awaitable".msg = "Use collections.abc.Awaitable instead"
lint.flake8-tidy-imports.banned-api."typing.Callable".msg = "Use collections.abc.Callable instead"
lint.flake8-tidy-imports.banned-api."typing.Collection".msg = "Use collections.abc.Collection instead"
lint.flake8-tidy-imports.banned-api."typing.Mapping".msg = "Use collections.abc.Mapping instead"
lint.flake8-tidy-imports.banned-api."typing.MutableMapping".msg = "Use collections.abc.MutableMapping instead"
lint.flake8-tidy-imports.banned-api."typing.MutableSequence".msg = "Use collections.abc.MutableSequence instead"
lint.flake8-tidy-imports.banned-api."typing.Sequence".msg = "Use collections.abc.Sequence instead"
lint.pylint.max-args = 6
lint.pylint.max-statements = 30
# Preserve types, even if a file imports `from __future__ import annotations`.
lint.pyupgrade.keep-runtime-typing = true
[tool.pyproject-fmt]
keep_full_version = true
max_supported_python = "3.14"
[tool.mypy]
files = "openfeature,tests/typechecking"
python_version = "3.10" # should be identical to the minimum supported version
namespace_packages = true
explicit_package_bases = true
local_partial_types = true # will become the new default from version 2
allow_redefinition_new = true # will become the new default from version 2
fixed_format_cache = true # new caching mechanism
pretty = true
strict = true
disallow_any_generics = false
[tool.pytest]
strict = true
asyncio_default_fixture_loop_scope = "function"
[tool.coverage]
report.exclude_also = [
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
]
[tool.poe]
executor = "uv"
tasks.test = "pytest tests"
tasks.test-cov = "coverage run -m pytest tests"
tasks.cov-report = "coverage xml"
tasks.cov = [ "test-cov", "cov-report" ]
tasks.e2e = [
{ cmd = "git submodule update --init --recursive" },
{ cmd = "cp spec/specification/assets/gherkin/* tests/features/" },
{ cmd = "behave tests/features/" },
{ cmd = "rm tests/features/*.feature" },
]
tasks.pre-commit = "pre-commit run -a"
tasks.test-all.parallel = [ "test-py310", "test-py311", "test-py312", "test-py313", "test-py314" ]
tasks.test-py310.cmd = "pytest tests"
tasks.test-py310.executor = { python = "3.10", isolated = true, frozen = true }
tasks.test-py311.cmd = "pytest tests"
tasks.test-py311.executor = { python = "3.11", isolated = true, frozen = true }
tasks.test-py312.cmd = "pytest tests"
tasks.test-py312.executor = { python = "3.12", isolated = true, frozen = true }
tasks.test-py313.cmd = "pytest tests"
tasks.test-py313.executor = { python = "3.13", isolated = true, frozen = true }
tasks.test-py314.cmd = "pytest tests"
tasks.test-py314.executor = { python = "3.14", isolated = true, frozen = true }