mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Fix Ruff UP011 (lru-cache-without-parameters)
https://docs.astral.sh/ruff/rules/lru-cache-without-parameters/
This commit is contained in:
@@ -61,7 +61,7 @@ class PsetQto:
|
|||||||
element.TemplateType = "QTO_TYPEDRIVENOVERRIDE"
|
element.TemplateType = "QTO_TYPEDRIVENOVERRIDE"
|
||||||
self.templates = templates
|
self.templates = templates
|
||||||
|
|
||||||
@lru_cache()
|
@lru_cache
|
||||||
def get_applicable(
|
def get_applicable(
|
||||||
self,
|
self,
|
||||||
ifc_class="",
|
ifc_class="",
|
||||||
@@ -89,7 +89,7 @@ class PsetQto:
|
|||||||
result.append(prop_set)
|
result.append(prop_set)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@lru_cache()
|
@lru_cache
|
||||||
def get_applicable_names(
|
def get_applicable_names(
|
||||||
self,
|
self,
|
||||||
ifc_class: str,
|
ifc_class: str,
|
||||||
@@ -164,7 +164,7 @@ class PsetQto:
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@lru_cache()
|
@lru_cache
|
||||||
def get_by_name(self, name: str) -> Optional[entity_instance]:
|
def get_by_name(self, name: str) -> Optional[entity_instance]:
|
||||||
for template in self.templates:
|
for template in self.templates:
|
||||||
for prop_set in template.by_type("IfcPropertySetTemplate"):
|
for prop_set in template.by_type("IfcPropertySetTemplate"):
|
||||||
|
|||||||
Reference in New Issue
Block a user