55to Python. The actual run is a noop.
66"""
77
8+
89class ConfigConsumer :
910 """A callable class that "needs" every configuration type.
1011
1112 Attributes:
1213 __name__ (str): Identifier for Phlex.
1314 """
1415
15- __name__ = ' config_consumer'
16+ __name__ = " config_consumer"
1617
1718 def __init__ (self , config ):
1819 """Create a config consumer object.
@@ -28,18 +29,18 @@ def __init__(self, config):
2829 None
2930 """
3031 # builtin types
31- assert config [' a_bool' ] == False # noqa: E712 # we really want to check False
32- assert config [' an_int' ] == - 37
33- assert config [' a_uint' ] == 18446744073709551616
34- assert config [' a_float' ] == 3.1415
35- assert config [' a_string' ] == ' foo'
32+ assert config [" a_bool" ] == False # noqa: E712 # we really want to check False
33+ assert config [" an_int" ] == - 37
34+ assert config [" a_uint" ] == 18446744073709551616
35+ assert config [" a_float" ] == 3.1415
36+ assert config [" a_string" ] == " foo"
3637
3738 # collection types
38- assert config [' some_bools' ] == (False , True )
39- assert config [' some_ints' ] == (- 1 , 42 , - 55 )
40- assert config [' some_uints' ] == (18446744073709551616 , 29 , 137 )
41- assert config [' some_floats' ] == (3.1415 , 2.71828 )
42- assert config [' some_strings' ] == (' aap' , ' noot' , ' mies' )
39+ assert config [" some_bools" ] == (False , True )
40+ assert config [" some_ints" ] == (- 1 , 42 , - 55 )
41+ assert config [" some_uints" ] == (18446744073709551616 , 29 , 137 )
42+ assert config [" some_floats" ] == (3.1415 , 2.71828 )
43+ assert config [" some_strings" ] == (" aap" , " noot" , " mies" )
4344
4445 def __call__ (self , i : int , j : int ) -> None :
4546 """Dummy routine to do something.
@@ -71,5 +72,4 @@ def PHLEX_REGISTER_ALGORITHMS(m, config):
7172 None
7273 """
7374 config_consumer = ConfigConsumer (config )
74- m .observe (config_consumer , input_family = config ["input" ])
75-
75+ m .observe (config_consumer , input_family = config ["input" ])
0 commit comments