Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (91 loc) · 3.41 KB
/
Copy pathpyproject.toml
File metadata and controls
95 lines (91 loc) · 3.41 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
[tool.ruff]
line-length = 99
target-version = "py314"
exclude = ["nextgisweb/raster_layer/validate_cog.py"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "ANN", "C4", "RUF022"]
ignore = ["E501", "E731", "UP030", "UP031", "UP032", "UP037"]
[tool.ruff.lint.per-file-ignores]
"**/test/*.py" = ["ANN"]
"./docker.py" = ["ANN"]
"./setup.py" = ["ANN"]
"./nextgisweb/script.py" = ["ANN"]
# TODO: Fix issues and remove ignores step by step
"nextgisweb/auth/*" = ["C4", "ANN"]
"nextgisweb/basemap/*" = ["C4", "ANN"]
"nextgisweb/core/*" = ["C4", "ANN"]
"nextgisweb/env/*" = ["C4", "ANN"]
"nextgisweb/feature_attachment/*" = ["C4", "ANN"]
"nextgisweb/feature_description/*" = ["C4", "ANN"]
"nextgisweb/feature_layer/*" = ["C4", "ANN"]
"nextgisweb/file_storage/*" = ["C4", "ANN"]
"nextgisweb/file_upload/*" = ["C4", "ANN"]
"nextgisweb/gui/*" = ["C4", "ANN"]
"nextgisweb/i18n/*" = ["C4", "ANN"]
"nextgisweb/lib/apitype/*" = ["C4", "ANN"]
"nextgisweb/lib/clann/*" = ["C4", "ANN"]
"nextgisweb/lib/config/*" = ["C4", "ANN"]
"nextgisweb/lib/dinject/*" = ["ANN401"]
"nextgisweb/lib/i18n/*" = ["C4", "ANN"]
"nextgisweb/lib/json/*" = ["ANN401"]
"nextgisweb/lib/logging/*" = ["C4", "ANN"]
"nextgisweb/lib/migration/*" = ["C4", "ANN"]
"nextgisweb/lib/ogrhelper/*" = ["ANN401"]
"nextgisweb/lib/registry/*" = ["C4", "ANN"]
"nextgisweb/lib/saext/*" = ["C4", "ANN"]
"nextgisweb/llm_core/*" = ["C4", "ANN"]
"nextgisweb/lookup_table/*" = ["C4", "ANN"]
"nextgisweb/ogcfserver/*" = ["C4", "ANN"]
"nextgisweb/panorama/*" = ["C4", "ANN"]
"nextgisweb/point_cloud/*" = ["C4", "ANN"]
"nextgisweb/postgis/*" = ["C4", "ANN"]
"nextgisweb/pyramid/*" = ["C4", "ANN"]
"nextgisweb/pytest/*" = ["C4", "ANN"]
"nextgisweb/raster_layer/*" = ["C4", "ANN"]
"nextgisweb/raster_mosaic/*" = ["C4", "ANN"]
"nextgisweb/raster_style/*" = ["C4", "ANN"]
"nextgisweb/render/*" = ["C4", "ANN"]
"nextgisweb/resource/*" = ["C4", "ANN"]
"nextgisweb/sentry/*" = ["C4", "ANN"]
"nextgisweb/sld/*" = ["C4", "ANN"]
"nextgisweb/social/*" = ["C4", "ANN"]
"nextgisweb/spatial_ref_sys/*" = ["C4", "ANN"]
"nextgisweb/static/*" = ["C4", "ANN"]
"nextgisweb/svg_marker_library/*" = ["C4", "ANN"]
"nextgisweb/tileset/*" = ["C4", "ANN"]
"nextgisweb/tmsclient/*" = ["C4", "ANN"]
"nextgisweb/vector_layer/*" = ["ANN401"]
"nextgisweb/webmap/*" = ["C4", "ANN"]
"nextgisweb/wfsclient/*" = ["C4", "ANN"]
"nextgisweb/wfsserver/*" = ["C4", "ANN"]
"nextgisweb/wmsclient/*" = ["C4", "ANN"]
"nextgisweb/wmsserver/*" = ["C4", "ANN"]
[tool.ruff.lint.isort]
variables = ["_"]
# Absolute imports are more readable, relative ones are circuitous. So, let's
# combine them with the following rules:
#
# 1. Environment (nextgisweb.env), library (nextgisweb.lib.*) and component
# (nextgisweb.*) modules must be imported using absolute imports.
#
# 2. Internal imports, which don't cross these boundaries must use relative
# imports. For example, you can import "nextgisweb.lib.foo.a" from
# "nextgisweb.lib.foo.b" as "from .a import ...", but can't import
# "from ..foo.a import ..." from "nextgisweb.lib.bar.c".
#
# Therefore, NextGIS Web extensions, like nextgisweb_qgis, will have the same
# imports structure and that's nice!
#
# TODO: Do we need some flake8 for that?
section-order = [
"future",
"standard-library",
"third-party",
"nextgisweb_env_lib",
"nextgisweb_comp",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"nextgisweb_env_lib" = ["nextgisweb.env", "nextgisweb.lib"]
"nextgisweb_comp" = ["nextgisweb"]