File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
# The MIT License
2
2
#
3
3
# Copyright (c) 2009-2011 Andreas Stuehrk
4
- # Copyright (c) 2020 Sebastian Ramacher
4
+ # Copyright (c) 2020-2021 Sebastian Ramacher
5
5
#
6
6
# Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
# of this software and associated documentation files (the "Software"), to deal
35
35
)
36
36
37
37
SUFFIXES = importlib .machinery .all_suffixes ()
38
+ LOADERS = (
39
+ (
40
+ importlib .machinery .ExtensionFileLoader ,
41
+ importlib .machinery .EXTENSION_SUFFIXES ,
42
+ ),
43
+ (
44
+ importlib .machinery .SourceFileLoader ,
45
+ importlib .machinery .SOURCE_SUFFIXES
46
+ ),
47
+ )
38
48
39
49
40
50
class ModuleGatherer :
@@ -144,7 +154,7 @@ def find_modules(self, path):
144
154
# Path is not readable
145
155
return
146
156
147
- finder = importlib .machinery .FileFinder (str (path ))
157
+ finder = importlib .machinery .FileFinder (str (path ), * LOADERS )
148
158
for p in children :
149
159
if any (fnmatch .fnmatch (p .name , entry ) for entry in self .skiplist ):
150
160
# Path is on skiplist
You can’t perform that action at this time.
0 commit comments