@@ -11,7 +11,6 @@ def bucket_type_key(bucket_type):
1111 """
1212
1313 def decorator (f ):
14-
1514 @functools .wraps (f )
1615 def wrapped (item , session ):
1716 key = f (item )
@@ -28,24 +27,24 @@ def wrapped(item, session):
2827 return decorator
2928
3029
31- @bucket_type_key (' global' )
30+ @bucket_type_key (" global" )
3231def get_global_key (item ):
3332 return None
3433
3534
36- @bucket_type_key (' package' )
35+ @bucket_type_key (" package" )
3736def get_package_key (item ):
3837 if not hasattr (item , "module" ):
3938 return os .path .split (item .location [0 ])[0 ]
4039 return item .module .__package__
4140
4241
43- @bucket_type_key (' module' )
42+ @bucket_type_key (" module" )
4443def get_module_key (item ):
4544 return item .location [0 ]
4645
4746
48- @bucket_type_key (' class' )
47+ @bucket_type_key (" class" )
4948def get_class_key (item ):
5049 if not hasattr (item , "cls" ):
5150 return item .location [0 ]
@@ -55,19 +54,19 @@ def get_class_key(item):
5554 return item .module .__name__
5655
5756
58- @bucket_type_key (' parent' )
57+ @bucket_type_key (" parent" )
5958def get_parent_key (item ):
6059 return item .parent
6160
6261
63- @bucket_type_key (' grandparent' )
62+ @bucket_type_key (" grandparent" )
6463def get_grandparent_key (item ):
6564 return item .parent .parent
6665
6766
68- @bucket_type_key (' none' )
67+ @bucket_type_key (" none" )
6968def get_none_key (item ):
70- raise RuntimeError (' When shuffling is disabled (bucket_type=none), item key should not be calculated' )
69+ raise RuntimeError (" When shuffling is disabled (bucket_type=none), item key should not be calculated" )
7170
7271
7372bucket_types = bucket_type_keys .keys ()
0 commit comments