File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/diffpy/srfit/equation Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -662,13 +662,16 @@ def __wrapSrFitOperators():
662
662
"""
663
663
opmod = literals .operators
664
664
excluded_types = set ((opmod .CustomOperator , opmod .UFuncOperator ))
665
- # check if opmod member should be wrapped as OperatorBuilder
666
- is_exported_type = lambda cls : (
667
- inspect .isclass (cls )
668
- and issubclass (cls , opmod .Operator )
669
- and not inspect .isabstract (cls )
670
- and cls not in excluded_types
671
- )
665
+
666
+ def is_exported_type (cls ):
667
+ """Check if the class should be wrapped as OperatorBuilder."""
668
+ return (
669
+ inspect .isclass (cls ) and
670
+ issubclass (cls , opmod .Operator ) and
671
+ not inspect .isabstract (cls ) and
672
+ cls not in excluded_types
673
+ )
674
+
672
675
# create OperatorBuilder objects
673
676
for nm , opclass in inspect .getmembers (opmod , is_exported_type ):
674
677
op = opclass ()
You can’t perform that action at this time.
0 commit comments