From 06b5e8048527f3668bf72e24e08598aa8a68dc8b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 4 May 2014 09:59:39 -0400 Subject: Refactoring, asymptotically approaching multi-language --- coverage/backward.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'coverage/backward.py') diff --git a/coverage/backward.py b/coverage/backward.py index 03fa651..e81dd19 100644 --- a/coverage/backward.py +++ b/coverage/backward.py @@ -50,12 +50,12 @@ if sys.version_info >= (3, 0): # Python 3.2 provides `tokenize.open`, the best way to open source files. import tokenize try: - open_source = tokenize.open # pylint: disable=E1101 + open_python_source = tokenize.open # pylint: disable=E1101 except AttributeError: from io import TextIOWrapper detect_encoding = tokenize.detect_encoding # pylint: disable=E1101 # Copied from the 3.2 stdlib: - def open_source(fname): + def open_python_source(fname): """Open a file in read only mode using the encoding detected by detect_encoding(). """ @@ -66,7 +66,7 @@ if sys.version_info >= (3, 0): text.mode = 'r' return text else: - def open_source(fname): + def open_python_source(fname): """Open a source file the best way.""" return open(fname, "rU") -- cgit v1.2.1