Skip to content

Commit

Permalink
use getattr instead of eval
Browse files Browse the repository at this point in the history
  • Loading branch information
j042 committed Nov 6, 2023
1 parent 625f60a commit d64a1ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gustaf/faces.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,6 @@ def to_subelements(
-------
subelements: boundary class
"""
return eval(
f"self.to_{self.__boundary_class__.__qualname__.lower()}(unique)"
)
return getattr(
self, f"to_{self.__boundary_class__.__qualname__.lower()}"
)(unique)

0 comments on commit d64a1ba

Please sign in to comment.