File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11# The MIT License
22#
33# Copyright (c) 2009-2011 Andreas Stuehrk
4- # Copyright (c) 2020 Sebastian Ramacher
4+ # Copyright (c) 2020-2021 Sebastian Ramacher
55#
66# Permission is hereby granted, free of charge, to any person obtaining a copy
77# of this software and associated documentation files (the "Software"), to deal
3535)
3636
3737SUFFIXES = 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+ )
3848
3949
4050class ModuleGatherer :
@@ -144,7 +154,7 @@ def find_modules(self, path):
144154 # Path is not readable
145155 return
146156
147- finder = importlib .machinery .FileFinder (str (path ))
157+ finder = importlib .machinery .FileFinder (str (path ), * LOADERS )
148158 for p in children :
149159 if any (fnmatch .fnmatch (p .name , entry ) for entry in self .skiplist ):
150160 # Path is on skiplist
You can’t perform that action at this time.
0 commit comments