Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
58 lines (52 loc) · 1.86 KB
/
Copy pathpyproject.toml
File metadata and controls
58 lines (52 loc) · 1.86 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
[tool.ruff]
target-version = "py310"
line-length = 88
extend-exclude = ["jupyter_notebooks"]
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"PIE", # flake8-pie
"EXE", # flake8-executable
"PLE", # pylint errors
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line length is handled by the formatter
"SIM108", # if/else blocks are often more readable than ternaries in examples
]
[tool.ruff.lint.per-file-ignores]
# the Qt backend has to be loaded before importing qtDisplay/PyQt
"examples/core_display_activate_manipulator.py" = ["E402"]
"examples/core_display_qt5_app.py" = ["E402"]
"examples/core_display_signal_slots.py" = ["E402"]
"examples/core_visualization_overpaint_viewer.py" = ["E402"]
[tool.pylint.main]
jobs = 0
# pythonocc modules are SWIG extensions, pylint can't introspect them
extension-pkg-allow-list = ["OCC"]
[tool.pylint."messages control"]
disable = [
"C", # conventions: naming, docstrings, etc.
"R", # refactoring suggestions
"no-name-in-module", # SWIG generated modules
"import-error", # optional dependencies (PyQt, gmsh, ...)
"unused-argument", # GUI callbacks take an unused event=None
"redefined-outer-name", # examples are scripts using globals
"redefined-builtin", # exit() menu callbacks
"attribute-defined-outside-init",
"fixme",
"protected-access",
]
[tool.mypy]
python_version = "3.10"
exclude = ["^jupyter_notebooks/"]
[[tool.mypy.overrides]]
# optional third party dependencies without type stubs
module = ["ifcopenshell.*", "mpl_toolkits.*", "scipy.*"]
ignore_missing_imports = true