diff options
author | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
commit | 70a6b49821a3226f55e9716f32d802d06640cb89 (patch) | |
tree | 3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/tabnanny.py | |
parent | ecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff) | |
download | cpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2 |
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/tabnanny.py')
-rwxr-xr-x | Lib/tabnanny.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py index 251df27..f38a79f 100755 --- a/Lib/tabnanny.py +++ b/Lib/tabnanny.py @@ -83,7 +83,7 @@ def check(file): if os.path.isdir(file) and not os.path.islink(file): if verbose: - print "%s: listing directory" % `file` + print "%r: listing directory" % (file,) names = os.listdir(file) for name in names: fullname = os.path.join(file, name) @@ -96,35 +96,34 @@ def check(file): try: f = open(file) except IOError, msg: - errprint("%s: I/O Error: %s" % (`file`, str(msg))) + errprint("%r: I/O Error: %s" % (file, msg)) return if verbose > 1: - print "checking", `file`, "..." + print "checking %r ..." % file try: process_tokens(tokenize.generate_tokens(f.readline)) except tokenize.TokenError, msg: - errprint("%s: Token Error: %s" % (`file`, str(msg))) + errprint("%r: Token Error: %s" % (file, msg)) return except NannyNag, nag: badline = nag.get_lineno() line = nag.get_line() if verbose: - print "%s: *** Line %d: trouble in tab city! ***" % ( - `file`, badline) - print "offending line:", `line` + print "%r: *** Line %d: trouble in tab city! ***" % (file, badline) + print "offending line: %r" % (line,) print nag.get_msg() else: if ' ' in file: file = '"' + file + '"' if filename_only: print file - else: print file, badline, `line` + else: print file, badline, repr(line) return if verbose: - print "%s: Clean bill of health." % `file` + print "%r: Clean bill of health." % (file,) class Whitespace: # the characters used for space and tab |