Skip to content

Commit dc90411

Browse files
committed
Python: Don't include docs/ folder
1 parent 004bb50 commit dc90411

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ module NotExposed {
115115
predicate isAllowedModule(Module mod) {
116116
// don't include anything found in site-packages
117117
exists(mod.getFile().getRelativePath()) and
118-
not mod.getFile().getRelativePath().regexpMatch("(?i)(^|/)examples?/.*") and
118+
not mod.getFile().getRelativePath().regexpMatch("(?i)((^|/)examples?|^docs)/.*") and
119119
// to counter things like `my-example/app/foo.py` being allowed under `app.foo`
120120
forall(string part | part = mod.getFile().getParent().getRelativePath().splitAt("/") |
121121
legalShortName(part)

0 commit comments

Comments
 (0)