File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -364,20 +364,23 @@ def main():
364
364
365
365
print (f"processing package: { package_name } " )
366
366
package = importlib .import_module (package_name )
367
+
368
+ if args .exclude is not None :
369
+ rex = re .compile (args .exclude )
370
+ mod_filter = lambda name : rex .search (name ) is None
371
+ else :
372
+ mod_filter = lambda name : True
373
+
367
374
mods = [
368
375
Module (
369
376
name ,
370
377
source = args .source ,
371
378
apipath = args .apipath ,
372
379
docpath = args .docpath ,
373
380
)
374
- for name in walk_package (package )
381
+ for name in walk_package (package ) if mod_filter ( name )
375
382
]
376
383
377
- if args .exclude is not None :
378
- rex = re .compile (args .exclude )
379
- mods = [mod for mod in mods if rex .search (mod .name ) is None ]
380
-
381
384
modules_api = ""
382
385
modules_doc = ""
383
386
You can’t perform that action at this time.
0 commit comments