11[build-system ]
2- requires = [ " poetry-core>=1.0.0" , ]
2+ requires = [" poetry-core>=1.0.0" ]
33build-backend = " poetry.core.masonry.api"
44
55[tool .poetry ]
66name = " app"
77version = " 1.0.0"
88description = " Escape Python Template Project"
9- authors = [
" Escape Technologies SAS <[email protected] >" , ]
10- maintainers = [
" Swan <[email protected] > " , " Antoine Carossio <[email protected] >" , ]
9+ authors = [
" Escape Technologies SAS <[email protected] >" ]
10+ maintainers = [
" Antoine Carossio <[email protected] >" ]
1111license = " MIT"
1212readme = " README.md"
1313homepage = " https://escape.tech/"
1414repository = " https://github.com/Escape-Technologies/python-project-template"
1515[[tool .poetry .packages ]]
1616include = " app"
1717
18- [tool .black ]
19- line-length = 120
20- skip-string-normalization = true
21-
22- [tool .ruff ]
23- unfixable = [ " F841" ,]
24- select = [ " F" , " E" , " W" , " C90" , " I" , " YTT" , " S" , " B" , " COM" , " C4" , " ISC" , " ICN" , " INP" , " PIE" , " T20" , " PYI" , " PT" , " Q" , " RSE" , " RET" , " TID" , " ARG" , " PGH" , " PL" , " PLC" , " PLE" , " PLR" , " PLW" , " NPY" , " RUF" , " TD002" , " TD004" , " TD005" , " TD007" ,]
25- exclude = [ " .venv" , " poetry.lock" , " __pycache__" , " pyproject.toml" ,]
26- ignore = [ " E999" , " UP015" , " S311" ,]
27- line-length = 160
28- target-version = " py311"
29- ignore-init-module-imports = true
30- task-tags = [ " TODO" ,]
31-
32- [tool .mypy ]
33- python_version = " 3.12"
34- disallow_untyped_defs = true
35- disallow_untyped_calls = true
36- disallow_incomplete_defs = true
37- disallow_untyped_decorators = true
38- no_implicit_optional = false
39- strict_equality = true
40- show_error_codes = true
41- warn_unreachable = true
42- warn_redundant_casts = true
43- warn_unused_ignores = true
44- warn_unused_configs = true
45- namespace_packages = true
46- pretty = true
47- files = " app, tests"
48- exclude = [ " .venv" , " setup.py" , " .git" , " .tox" , " dist" , " build" , " docs" , " node_modules" , " __pycache__" ,]
49- [[tool .mypy .overrides ]]
50- module = " opentelemetry.*"
51- ignore_missing_imports = true
52-
53- [[tool .mypy .overrides ]]
54- module = " networkx.*"
55- ignore_missing_imports = true
56-
57- [[tool .mypy .overrides ]]
58- module = " boto3.*"
59- ignore_missing_imports = true
60-
61- [[tool .mypy .overrides ]]
62- module = " botocore.*"
63- ignore_missing_imports = true
64-
65- [[tool .mypy .overrides ]]
66- module = " confluent_kafka.*"
67- ignore_missing_imports = true
68-
69- [[tool .mypy .overrides ]]
70- module = " aenum.*"
71- ignore_missing_imports = true
72-
73- [[tool .mypy .overrides ]]
74- module = " pydash.*"
75- ignore_missing_imports = true
76-
7718[tool .poetry .scripts ]
7819app-cli = " app:main"
7920
8021[tool .poetry .dependencies ]
8122python = " >=3.10,<=3.14"
8223pydantic = " *"
8324
84- [tool .coverage .run ]
85- parallel = true
86- omit = [ " _test.py" ,]
87-
88- [tool .pytest .ini_options ]
89- addopts = []
90- filterwarnings = [ " ignore:Module already imported.*:pytest.PytestAssertRewriteWarning" , " ignore::DeprecationWarning" ,]
91-
92- [tool .ruff .per-file-ignores ]
93- "__init__.py" = [ " F401" , " F403" ,]
94- "*_test.py" = [ " S101" ,]
95- "*/test/*" = [ " INP001" ,]
96- "*/scripts/*" = [ " INP001" ,]
97- "*test_*.py" = [ " S101" ,]
98-
99- [tool .ruff .pydocstyle ]
100- convention = " google"
101-
102- [tool .ruff .flake8-quotes ]
103- docstring-quotes = " double"
104- inline-quotes = " single"
105-
106- [tool .ruff .pylint ]
107- max-branches = 15
108- max-args = 10
109-
110- [tool .ruff .pycodestyle ]
111- max-doc-length = 160
112- ignore-overlong-task-comments = true
113-
114- [tool .ruff .mccabe ]
115- max-complexity = 15
116-
11725[tool .poetry .group .dev .dependencies ]
118- flake8 = " *"
11926mypy = " *"
120- pydot = " *"
12127ruff = " *"
12228toml = " *"
12329pytest = " *"
@@ -136,10 +42,102 @@ ipykernel = "*"
13642mdformat = " *"
13743gitlint = " *"
13844
139- [tool .poetry .group .dev .dependencies .black ]
140- version = " *"
141- extras = [ " jupyter" ,]
14245
143- [tool .poetry .group .dev .dependencies .betterproto ]
144- version = " *"
145- extras = [ " compiler" ,]
46+ # #######################################################
47+ # ###################### Ruff ###########################
48+ # #######################################################
49+
50+ [tool .ruff ]
51+ exclude = [" .venv" , " poetry.lock" , " __pycache__" , " pyproject.toml" ]
52+ line-length = 120
53+ target-version = " py312"
54+
55+ [tool .ruff .lint ]
56+ unfixable = [" F841" ]
57+ ignore = [" UP015" , " S311" , " PYI041" ]
58+ task-tags = [" TODO" ]
59+ select = [" ALL" ]
60+
61+ [tool .ruff .lint .pydocstyle ]
62+ convention = " google"
63+
64+ [tool .ruff .format ]
65+ quote-style = " preserve"
66+
67+ [tool .ruff .lint .flake8-quotes ]
68+ docstring-quotes = " double"
69+ inline-quotes = " single"
70+
71+ [tool .ruff .lint .per-file-ignores ]
72+ "__init__.py" = [
73+ " F401" , # Module imported but unused
74+ " F403" , # 'from module import *' used; unable to detect undefined names
75+ ]
76+ "*/test/*" = [
77+ " INP001" ,
78+ ] # As part of an implicit namespace package, missing __init__ file
79+ "*/scripts/*" = [
80+ " INP001" ,
81+ ] # As part of an implicit namespace package, missing __init__ file
82+ "*_test.py" = [" S101" ] # Do not use assert statements
83+ "*test_*.py" = [" S101" ]
84+
85+ [tool .ruff .lint .pylint ]
86+ max-args = 4
87+ max-branches = 5
88+ max-statements = 5
89+
90+ [tool .ruff .lint .pycodestyle ]
91+ max-doc-length = 160
92+ ignore-overlong-task-comments = true
93+
94+ [tool .ruff .lint .mccabe ]
95+ max-complexity = 10
96+
97+ # #######################################################
98+ # ###################### MyPy ###########################
99+ # #######################################################
100+
101+ [tool .mypy ]
102+ python_version = " 3.12"
103+ disallow_untyped_defs = true
104+ disallow_untyped_calls = true
105+ disallow_incomplete_defs = true
106+ disallow_untyped_decorators = true
107+ no_implicit_optional = false
108+ strict_equality = true
109+ show_error_codes = true
110+ warn_unreachable = true
111+ warn_redundant_casts = true
112+ warn_unused_ignores = true
113+ warn_unused_configs = true
114+ namespace_packages = true
115+ pretty = true
116+ files = " app, tests"
117+ exclude = [
118+ " .venv" ,
119+ " setup.py" ,
120+ " .git" ,
121+ " .tox" ,
122+ " dist" ,
123+ " build" ,
124+ " docs" ,
125+ " node_modules" ,
126+ " __pycache__" ,
127+ ]
128+
129+
130+ # #######################################################
131+ # ###################### Pytest #########################
132+ # #######################################################
133+
134+ [tool .coverage .run ]
135+ parallel = true
136+ omit = [" _test.py" ]
137+
138+ [tool .pytest .ini_options ]
139+ addopts = []
140+ filterwarnings = [
141+ " ignore:Module already imported.*:pytest.PytestAssertRewriteWarning" ,
142+ " ignore::DeprecationWarning" ,
143+ ]
0 commit comments