Skip to content

Commit

Permalink
Refactor find_all function to skip callable and self-referencing attr…
Browse files Browse the repository at this point in the history
…ibutes
  • Loading branch information
cleder committed Oct 26, 2024
1 parent b13f0ec commit cbd64cf
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fastkml/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cbd64cf

Please sign in to comment.