@@ -38,3 +38,46 @@ disableBytesTypePromotions = true
3838reportUnnecessaryTypeIgnoreComment = true
3939# Just to add a quick insert of `# pyright: ignore[xxx]` comments in Pylance.
4040enableTypeIgnoreComments = false
41+
42+ # Define here general ruff settings,
43+ # then they will be inherited projects .toml files.
44+ # This allows using assuming different Python version for different projects.
45+ [tool .ruff ]
46+ exclude = [
47+ # Submodules.
48+ " src/ifcopenshell-python/ifcopenshell/express" ,
49+ " src/ifcopenshell-python/ifcopenshell/mvd" ,
50+ " src/ifcopenshell-python/ifcopenshell/simple_spf" ,
51+ " src/svgfill" ,
52+ #
53+ # Unformatted.
54+ " src/exterior-shell-extractor" ,
55+ # Incompatible with linter.
56+ " src/ifc2ca/templates" ,
57+ ]
58+ [tool .ruff .lint ]
59+ select = [
60+ # Default Ruff rules.
61+ # "E4", # imports
62+ # "E7", # statements
63+ " E9" , # io errors
64+ # "F", # pyflakes
65+ #
66+ " FA" , # future annotations
67+ " UP" , # pyupgrade
68+ ]
69+ ignore = [
70+ " FA100" , # Conflicts with Blender using annotations for props definitions.
71+ # Maybe will enable later:
72+ " UP006" , # deprecated symbols
73+ " UP007" , # Optional to X | Y
74+ " UP015" , # Unnecessary mode argument
75+ " UP028" , # yield for -> yield from
76+ " UP030" , # implicit references for positional format fields
77+ " UP031" , # Replace % with .format
78+ " UP032" , # Replace .format with f-string
79+ " UP035" , # List -> list
80+
81+ # Deprecated Ruff rules.
82+ " UP038" , # Use X | Y in isinstance
83+ ]
0 commit comments