mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
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.
This commit is contained in:
parent
4eaf50f435
commit
0e661dcdbf
1 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ INCLUDEPATTERN = "*.h"
|
||||||
# v variable definitions
|
# v variable definitions
|
||||||
# x extern and forward variable declarations
|
# x extern and forward variable declarations
|
||||||
|
|
||||||
import os, glob, re, sys, tempfile
|
import os, glob, re, sys
|
||||||
|
|
||||||
def findnames(file, prefixes=()):
|
def findnames(file, prefixes=()):
|
||||||
names = {}
|
names = {}
|
||||||
|
|
@ -83,7 +83,7 @@ def print_undoc_symbols(prefix, docdir, incdir):
|
||||||
names = dict.keys()
|
names = dict.keys()
|
||||||
names.sort()
|
names.sort()
|
||||||
for name in names:
|
for name in names:
|
||||||
if docs.find(name) == -1:
|
if not re.search("%s\\W" % name, docs):
|
||||||
print dict[name], name
|
print dict[name], name
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue