File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1567,7 +1567,7 @@ def _validate_render_params(
1567
1567
raise TypeError ("Parameter 'elements' must be a string or a list of strings." )
1568
1568
1569
1569
elements = [elements ] if isinstance (elements , str ) else elements
1570
- sdata_elements = eval ( f" sdata. { element_type } " ) # noqa: PGH001
1570
+ sdata_elements = getattr ( sdata , element_type )
1571
1571
if any (e not in sdata_elements for e in elements ):
1572
1572
raise ValueError (
1573
1573
f"Not all specified { element_type } elements were found. Available elements are: "
@@ -1814,7 +1814,7 @@ def _get_wanted_render_elements(
1814
1814
wanted_elements = (
1815
1815
params .elements
1816
1816
if params .elements is not None
1817
- else list (eval ( f" sdata. { element_type } .keys()" )) # noqa: PGH001
1817
+ else list (getattr ( sdata , element_type ) .keys ())
1818
1818
)
1819
1819
1820
1820
wanted_elements_on_cs = [
You can’t perform that action at this time.
0 commit comments