mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
satisfy the tabnanny
This commit is contained in:
parent
9082cdd009
commit
0b7b4b8a22
3 changed files with 333 additions and 333 deletions
|
@ -34,7 +34,8 @@ def treat_file(file, outfp):
|
||||||
size = 0
|
size = 0
|
||||||
while 1:
|
while 1:
|
||||||
line = fp.readline()
|
line = fp.readline()
|
||||||
if not line: break
|
if not line:
|
||||||
|
break
|
||||||
lineno = lineno + 1
|
lineno = lineno + 1
|
||||||
m = matcher.search(line)
|
m = matcher.search(line)
|
||||||
if m:
|
if m:
|
||||||
|
|
|
@ -150,7 +150,6 @@ class Ignore:
|
||||||
self._ignore[modulename] = 0
|
self._ignore[modulename] = 0
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def run(trace, cmd):
|
def run(trace, cmd):
|
||||||
import __main__
|
import __main__
|
||||||
dict = __main__.__dict__
|
dict = __main__.__dict__
|
||||||
|
@ -330,8 +329,8 @@ def create_results_log(results, dirname = ".", show_missing = 1,
|
||||||
try:
|
try:
|
||||||
lines = open(filename, 'r').readlines()
|
lines = open(filename, 'r').readlines()
|
||||||
except IOError, err:
|
except IOError, err:
|
||||||
sys.stderr.write(
|
sys.stderr.write("%s: Could not open %s for reading " \
|
||||||
"%s: Could not open %s for reading because: %s - skipping\n" % \
|
"because: %s - skipping\n" % \
|
||||||
("trace", `filename`, err.strerror))
|
("trace", `filename`, err.strerror))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -350,8 +349,8 @@ def create_results_log(results, dirname = ".", show_missing = 1,
|
||||||
outfile = open(listfilename, 'w')
|
outfile = open(listfilename, 'w')
|
||||||
except IOError, err:
|
except IOError, err:
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
'%s: Could not open %s for writing because: %s - skipping\n' %
|
'%s: Could not open %s for writing because: %s" \
|
||||||
("trace", `listfilename`, err.strerror))
|
"- skipping\n' % ("trace", `listfilename`, err.strerror))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# If desired, get a list of the line numbers which represent
|
# If desired, get a list of the line numbers which represent
|
||||||
|
@ -396,8 +395,8 @@ def create_results_log(results, dirname = ".", show_missing = 1,
|
||||||
marshal.dump(results.modules,
|
marshal.dump(results.modules,
|
||||||
open(os.path.join(dirname, "modules"), "w"))
|
open(os.path.join(dirname, "modules"), "w"))
|
||||||
except IOError, err:
|
except IOError, err:
|
||||||
sys.stderr.write("cannot save counts/modules files because %s" %
|
sys.stderr.write("cannot save counts/modules " \
|
||||||
err.strerror)
|
"files because %s" % err.strerror)
|
||||||
|
|
||||||
# There is a lot of code shared between these two classes even though
|
# There is a lot of code shared between these two classes even though
|
||||||
# it is straightforward to make a super class to share code. However,
|
# it is straightforward to make a super class to share code. However,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue