File tree 1 file changed +11
-11
lines changed
1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -49,25 +49,25 @@ Check the public_hoist_packages attribute for duplicates.
49
49
50
50
################################################################################
51
51
def _gather_package_content_excludes (keyed_lists , * names ):
52
- keys = []
53
- result = {}
52
+ found = False
53
+ excludes = []
54
54
for name in names :
55
- if name and ( name in keyed_lists or "*" in keyed_lists ) :
56
- keys . append ( name )
57
- v = keyed_lists [name ] if name in keyed_lists else keyed_lists [ "*" ]
55
+ if name in keyed_lists :
56
+ found = True
57
+ v = keyed_lists [name ]
58
58
if type (v ) == "list" :
59
- for item in v :
60
- result [ item ] = []
59
+ for e in v :
60
+ excludes . append ( e )
61
61
elif type (v ) == "string" :
62
- result [ v ] = []
62
+ excludes . append ( v )
63
63
else :
64
64
fail ("expected value to be list or string" )
65
65
66
66
# in case the key has not been met even once, we return None, instead of empty list as empty list is a valid value
67
- if not keys :
68
- return None
67
+ if not found and "*" in keyed_lists :
68
+ excludes = keyed_lists [ "*" ] if type ( keyed_lists [ "*" ]) == "list" else [ keyed_lists [ "*" ]]
69
69
70
- return result . keys ()
70
+ return None if len ( excludes ) == 0 else excludes
71
71
72
72
################################################################################
73
73
def _gather_values_from_matching_names (additive , keyed_lists , * names ):
You can’t perform that action at this time.
0 commit comments