Files
IfcOpenShell/pyproject.toml
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

86 lines
2.3 KiB
TOML
Raw Normal View History

2025-12-20 14:06:48 +05:00
[project]
name = "IfcOpenShell"
version = "0.0.0"
dependencies = [
2026-01-23 22:46:21 +00:00
"black==26.1.0",
2026-02-13 22:45:21 +00:00
"ruff==0.15.1",
2025-12-20 14:06:48 +05:00
"poethepoet",
2026-01-30 22:45:49 +00:00
"gersemi==0.25.4",
2025-12-20 14:06:48 +05:00
]
2020-11-04 08:49:04 +01:00
[tool.black]
line-length = 120
2025-07-25 17:19:16 +05:00
include = '''
src/.*.pyi?$
|nix/.*.pyi?$
'''
extend-exclude = '''
src/ifcopenshell-python/ifcopenshell/express/*
|src/ifcopenshell-python/ifcopenshell/mvd/*
2025-02-03 11:43:04 +05:00
|src/ifcopenshell-python/ifcopenshell/simple_spf/*
|src/ifc2ca/templates/*
|src/svgfill
|src/exterior-shell-extractor
'''
[tool.pyright]
reportInvalidTypeForm = false
2024-07-01 13:33:47 +05:00
disableBytesTypePromotions = true
reportUnnecessaryTypeIgnoreComment = true
# Define here general ruff settings,
2025-11-17 13:13:25 +05:00
# 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]
2025-09-29 10:19:20 +05:00
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]
2025-08-08 16:24:20 +05:00
"RUF022", # sort __all__
2025-12-19 18:53:04 +05:00
"I", # import sorting
]
ignore = [
"FA100", # Conflicts with Blender using annotations for props definitions.
# Maybe will enable later:
"UP007", # Optional to X | Y
2025-06-18 13:27:13 +05:00
"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
]
2025-10-28 18:01:54 +05:00
[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"]
2025-12-20 13:11:25 +05:00
cmake-format = "gersemi . --in-place"