chore(deps): drop poetry as a dependency in the python automate template (#40)

* chore: bump specklepy

* refactor: requirements files

* refactor: dockerfile

* refactor: update GitHub actions

* refactor: update devcontainer config

* docs: updated `README`

* docs: better explanations

* docs: wording

* chore: dependabot config

* docs: keeping things in sync

* fix: skip pip upgrade

* refactor: updated devcontainer

* refactor: toml instead of requirements

* refactor: update docker

* docs: updated `README`

* chore: classifiers does nothing

* chore: wrap up the v3 transition

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
This commit is contained in:
Björn Steinhagen
2025-06-03 13:29:18 +02:00
committed by GitHub
parent cf3a8f4267
commit 4bcf005f4a
11 changed files with 136 additions and 1484 deletions
+4 -4
View File
@@ -7,8 +7,8 @@ from specklepy.objects import Base
def flatten_base(base: Base) -> Iterable[Base]:
"""Flatten a base object into an iterable of bases.
This function recursively traverses the `elements` or `@elements` attribute of the
This function recursively traverses the `elements` or `@elements` attribute of the
base object, yielding each nested base object.
Args:
@@ -19,9 +19,9 @@ def flatten_base(base: Base) -> Iterable[Base]:
"""
# Attempt to get the elements attribute, fallback to @elements if necessary
elements = getattr(base, "elements", getattr(base, "@elements", None))
if elements is not None:
for element in elements:
yield from flatten_base(element)
yield base