@@ -94,7 +94,7 @@ def __init__(self, value_extractor: ExtractorExpression[V, R]):
9494 else :
9595 if isinstance (value_extractor , ValueExtractor ):
9696 self .extractor = value_extractor
97- elif type (value_extractor ) == str :
97+ elif isinstance (value_extractor , str ) :
9898 self .extractor = Extractors .extract (value_extractor )
9999 else :
100100 raise ValueError ("value_extractor cannot be any other type" )
@@ -233,7 +233,7 @@ def __init__(
233233 :param post_multiplication: pass true to return the value as it was before it was multiplied, or pass false
234234 to return the value as it is after it is multiplied
235235 """
236- if type (name_or_manipulator ) == str :
236+ if isinstance (name_or_manipulator , str ) :
237237 manipulator : ValueManipulator [Any , Numeric ] = self .create_custom_manipulator (name_or_manipulator )
238238 super ().__init__ (manipulator )
239239 else :
@@ -266,7 +266,7 @@ def __init__(self, name_or_manipulator: ManipulatorExpression, increment: Numeri
266266 :param post_increment: pass `True` to return the value as it was before it was incremented, or pass `False`
267267 to return the value as it is after it is incremented
268268 """
269- if type (name_or_manipulator ) == str :
269+ if isinstance (name_or_manipulator , str ) :
270270 manipulator : ValueManipulator [Any , Numeric ] = self .create_custom_manipulator (name_or_manipulator )
271271 super ().__init__ (manipulator )
272272 else :
@@ -477,7 +477,7 @@ def __init__(self, updater_or_property_name: UpdaterExpression[V, bool], value:
477477 :param value: the value to update the target entry with
478478 """
479479 super ().__init__ ()
480- if type (updater_or_property_name ) == str :
480+ if type (updater_or_property_name ) == str : # noqa: E721
481481 self .updater : ValueUpdater [V , bool ]
482482 if updater_or_property_name .find ("." ) == - 1 :
483483 self .updater = UniversalUpdater (updater_or_property_name )
0 commit comments