forked from freeorion/freeorion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
148 lines (127 loc) · 2.5 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
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
[tool.black]
# do not include pyi files, since they are generated
include = '\.py?$'
# Add non python directories to extended ignore
# This speedups black run
--extend-exclude = """
^/(
client
| cmake
| combat
| doc
| default/data
| default/shaders
| default/stringtables
| documentation
| Empire
| GG
| godot
| msvc2017
| msvc2019
| msvc2022
| network
| packaging
| parse
| python
| server
| snap
| test
| tmp
| UI
| universe
| util
)/
"""
target-version = ["py39"]
line-length=120
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"*auth/auth.py" = ["E402"]
"*chat/chat.py" = ["E402"]
"*universe_generation/universe_generator.py" = ["E402"]
"*FreeOrionAI.py" = ["E402"]
"*universe_generation/teams.py" = ["E402"]
"__init__.py" = [
"F401",
"F403",
]
"*turn_events/turn_events.py" = ["E402"]
"*tests/conftest.py" = [
"E402",
"F401",
]
# Limitations for FOCS skeletons, it would be nice to solve this
"default/scripting/*" = ["F403", "F405"]
# Since imports are empty we need to use asterisk import between skeletons
"default/scripting/focs/*" = ["F405"]
"default/scripting/game_rules.focs.py"=["F821"]
"test-scripting/game_rules.focs.py"=["F821"]
"test-scripting/*"=["F405", "F403"]
[tool.ruff.lint.isort]
extra-standard-library=["freeorion", "freeOrionAIInterface"]
[tool.ruff.lint]
select = [
"C9",
"E",
"F",
"W",
"UP",
"I",
"ANN",
]
ignore = [
"E501",
# Annotation won't fix
"ANN101", "ANN202", "ANN204", "ANN102",
# Annotation nice to fix
"ANN0",
"ANN201",
"ANN205",
"ANN401",
]
[tool.ruff]
src = [
"default/python",
"default/python/AI",
"default/python/universe_generation",
"default/python/charting",
"default/scripting",
"test-scripting",
"check"
]
target-version = "py39"
line-length=120
exclude = [
"*_venv/",
"venv_*/",
"venv/",
]
builtins = []
[tool.mypy]
exclude = [
# Temp and tech dirs
"^(venv|venv_)",
# Not scripting directories
'^default/data',
'^default.python',
'^test-scripting',
'^check',
'^doc',
'^cmake',
'^msvc',
'^scripting/common',
]
explicit_package_bases = true
no_site_packages = true
mypy_path = "default/scripting"
disable_error_code = ['name-defined', 'var-annotated']
fast_module_lookup = true
[tool.pyright]
include = ["default/scripting/", "check/check_file_changed"]
exclude=[]
pythonVersion = "3.9"
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
reportUndefinedVariable = false