-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
117 lines (100 loc) · 3.13 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
[tool.poetry]
name = "pydantic-consul-settings"
version = "0.0.0"
description = "Add Consul as source of env variable to settings"
authors = ["Jag_k <jag-k@users.noreply.github.com>"]
license = "MIT"
repository = "https://github.com/jag-k/pydantic-consul-settings"
homepage = "https://github.com/jag-k/pydantic-consul-settings#readme"
readme = "README.md"
packages = [
{ include = "pydantic_consul_settings", from = "." },
]
[tool.poetry.dependencies]
python = "^3.11"
pydantic = "^2"
pydantic-settings = "^2"
python-consul2 = "^0.1.5"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.6.2"
ruff = "^0.2.2"
ssort = "^0.12.4"
ruff-lsp = "^0.0.52"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
[tool.poetry-dynamic-versioning.substitution]
files = [
"pydantic_consul_settings/version.py",
]
[tool.poetry-dynamic-versioning.files."pydantic_consul_settings/version.py"]
persistent-substitution = true
initial-content = """
# These version placeholders will be replaced later during substitution.
__version__ = "0.0.0"
__version_tuple__ = (0, 0, 0)
"""
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
# https://docs.astral.sh/ruff/
[tool.ruff]
target-version = "py311"
line-length = 120
extend-exclude = [
".pytest_cache",
".idea",
]
# https://docs.astral.sh/ruff/settings/#lint
[tool.ruff.lint]
ignore-init-module-imports = true
select = [
'F', # flake8
'I', # isort
'B', # flake8-bugbear
'D', # pydocstyle
'W', # pycodestyle (warnings)
'E', # pycodestyle (errors)
'N', # pep8-naming
'PT', # flake8-pytest-style
'C90', # mccabe
]
ignore = [
'B012', # {name} inside finally blocks cause exceptions to be silenced
'D100', # Missing docstring in public module
'D104', # Missing docstring in public package
'D105', # Missing docstring in magic method
'D106', # Missing docstring in public nested class
'D107', # Missing docstring in __init__
'D203', # 1 blank line required before class docstring
'D401', # First line of docstring should be in imperative mood: "{first_line}"
'D404', # First word of the docstring should not be "This"
'D207', # Docstring is under-indented
'D208', # Docstring is over-indented
]
# https://docs.astral.sh/ruff/settings/#extend-per-file-ignores
[tool.ruff.lint.extend-per-file-ignores]
'__init__.py' = [
'F401', # {name} imported but unused; consider using importlib.util.find_spec to test for availability
'F403', # from {name} import * used; unable to detect undefined names
'F405', # {name} may be undefined, or defined from star imports
]
# https://docs.astral.sh/ruff/settings/#lintpydocstyle
[tool.ruff.lint.pydocstyle]
convention = 'pep257'
# https://docs.astral.sh/ruff/settings/#lintmccabe
[tool.ruff.lint.mccabe]
max-complexity = 6
# https://docs.astral.sh/ruff/settings/#lintisort
[tool.ruff.lint.isort]
section-order = [
'future',
'standard-library',
'third-party',
'first-party',
'local-folder',
]
known-first-party = ["pydantic_consul_settings"]
lines-after-imports = 2
lines-between-types = 1