pyproject: flip ty rules to error-by-default, review all new rules added since version bump

This commit is contained in:
Andrej730
2026-07-15 11:18:00 +05:00
parent c013b9aca7
commit 8718db63da
16 changed files with 94 additions and 110 deletions
+7 -1
View File
@@ -82,6 +82,11 @@ MAIN_CSV_HEADER_COLUMNS.extend(
)
class CostRate(TypedDict):
Schedule: str | None
RateID: str | None
class CostItem(TypedDict):
children: list[CostItem]
ifc: NotRequired[ifcopenshell.entity_instance]
@@ -97,6 +102,7 @@ class CostItem(TypedDict):
Property: Union[str, None]
Query: Union[str, None]
CostRate: CostRate | None
Formula: Union[str, None]
# QuantityClass: Union[str, None]
@@ -239,7 +245,7 @@ class Csv2Ifc:
cost_values = float(cost_values) if cost_values else None
if self.has_rates:
cost_rate = {
cost_rate: CostRate = {
"Schedule": row[(self.headers["RateSchedule"])] if "RateSchedule" in self.headers else None,
"RateID": row[(self.headers["RateID"])] if "RateID" in self.headers else None,
}
+3 -2
View File
@@ -26,7 +26,8 @@ import logging
import os
import time
from collections import Counter
from typing import Optional, TypedDict, Union
from typing import Optional, Union
from typing_extensions import TypedDict
import ifcopenshell
import ifcopenshell.util.cost
@@ -35,7 +36,7 @@ import ifcopenshell.util.element
import ifcopenshell.util.unit
class CostItem(TypedDict):
class CostItem(TypedDict, extra_items=float):
# Exported columns.
Index: int
Hierarchy: str
+1
View File
@@ -17,6 +17,7 @@ classifiers = [
]
dependencies = [
"ifcopenshell",
"typing_extensions",
]
[project.optional-dependencies]