From cbd64cf14f0dcda05e6ba1fb7f9d44476f045cc1 Mon Sep 17 00:00:00 2001 From: Christian Ledermann Date: Sat, 26 Oct 2024 17:11:43 +0100 Subject: [PATCH] Refactor find_all function to skip callable and self-referencing attributes --- fastkml/utils.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fastkml/utils.py b/fastkml/utils.py index 8872ddb9..71d879a4 100644 --- a/fastkml/utils.py +++ b/fastkml/utils.py @@ -55,10 +55,6 @@ def find_all( return for attr_name in attrs: attr = getattr(obj, attr_name) - if callable(attr): - continue - if attr is obj: - continue try: for item in attr: yield from find_all(item, of_type=of_type, **kwargs)