Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e661dc

Browse files
author
Thomas Heller
committed
Replace the simpleminded string.find with a re.search looking only for
full words. Before that, something like 'PyObject_Call' was missed because 'PyObject_CallFunction' was found. Passes PyChecker now.
1 parent 4eaf50f commit 0e661dc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/tools/undoc_symbols.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
# v variable definitions
4747
# x extern and forward variable declarations
4848

49-
import os, glob, re, sys, tempfile
49+
import os, glob, re, sys
5050

5151
def findnames(file, prefixes=()):
5252
names = {}
@@ -83,7 +83,7 @@ def print_undoc_symbols(prefix, docdir, incdir):
8383
names = dict.keys()
8484
names.sort()
8585
for name in names:
86-
if docs.find(name) == -1:
86+
if not re.search("%s\\W" % name, docs):
8787
print dict[name], name
8888

8989
if __name__ == '__main__':

0 commit comments

Comments
 (0)