mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
44f0a4a39b
Since the latest gersemi version, it now respects gitignore.
86 lines
2.3 KiB
TOML
86 lines
2.3 KiB
TOML
[project]
|
|
name = "IfcOpenShell"
|
|
version = "0.0.0"
|
|
dependencies = [
|
|
"black==26.1.0",
|
|
"ruff==0.14.14",
|
|
"poethepoet",
|
|
"gersemi==0.25.1",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 120
|
|
include = '''
|
|
src/.*.pyi?$
|
|
|nix/.*.pyi?$
|
|
'''
|
|
extend-exclude = '''
|
|
src/ifcopenshell-python/ifcopenshell/express/*
|
|
|src/ifcopenshell-python/ifcopenshell/mvd/*
|
|
|src/ifcopenshell-python/ifcopenshell/simple_spf/*
|
|
|src/ifc2ca/templates/*
|
|
|src/svgfill
|
|
|src/exterior-shell-extractor
|
|
'''
|
|
|
|
[tool.pyright]
|
|
reportInvalidTypeForm = false
|
|
disableBytesTypePromotions = true
|
|
reportUnnecessaryTypeIgnoreComment = true
|
|
|
|
# Define here general ruff settings,
|
|
# then they will be inherited by projects' .toml files.
|
|
# This allows using assuming different Python version for different projects.
|
|
[tool.ruff]
|
|
exclude = [
|
|
# Submodules.
|
|
"src/ifcopenshell-python/ifcopenshell/express",
|
|
"src/ifcopenshell-python/ifcopenshell/mvd",
|
|
"src/ifcopenshell-python/ifcopenshell/simple_spf",
|
|
"src/svgfill",
|
|
#
|
|
# Unformatted.
|
|
"src/exterior-shell-extractor",
|
|
# Incompatible with linter.
|
|
"src/ifc2ca/templates",
|
|
]
|
|
[tool.ruff.lint]
|
|
preview = true
|
|
select = [
|
|
# Default Ruff rules.
|
|
# "E4", # imports
|
|
# "E7", # statements
|
|
"E9", # io errors
|
|
# "F", # pyflakes
|
|
#
|
|
"FA", # future annotations
|
|
"UP", # pyupgrade
|
|
"RUF015", # next() > list_comprehension[0]
|
|
"RUF022", # sort __all__
|
|
"I", # import sorting
|
|
]
|
|
ignore = [
|
|
"FA100", # Conflicts with Blender using annotations for props definitions.
|
|
# Maybe will enable later:
|
|
"UP007", # Optional to X | Y
|
|
"UP045", # Optional to X | None
|
|
"UP015", # Unnecessary mode argument
|
|
"UP028", # yield for -> yield from
|
|
"UP030", # implicit references for positional format fields
|
|
"UP031", # Replace % with .format
|
|
"UP032", # Replace .format with f-string
|
|
]
|
|
|
|
[tool.poe.tasks]
|
|
|
|
ruff-main = "ruff check --extend-exclude nix/build-all.py"
|
|
# It's actually Python 3.6, but ruff only supports 3.7+, but it should do.
|
|
ruff-old = "ruff check nix/build-all.py --target-version py37"
|
|
ruff.sequence = ["ruff-main", "ruff-old"]
|
|
|
|
black = "black ."
|
|
|
|
format.sequence = ["black", "ruff-main", "ruff-old"]
|
|
|
|
cmake-format = "gersemi . --in-place"
|