summaryrefslogtreecommitdiff
path: root/coverage/backward.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-05-04 09:59:39 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-05-04 09:59:39 -0400
commit94cfa23bc1c22587979ac2343dcd553789584472 (patch)
tree0b7a0037cb7ca21ee211755def99a41ac4f55aae /coverage/backward.py
parent846a0de82c2a943d6011d8a0d44a0c928a4695f1 (diff)
downloadpython-coveragepy-git-94cfa23bc1c22587979ac2343dcd553789584472.tar.gz
Refactoring, asymptotically approaching multi-language
Diffstat (limited to 'coverage/backward.py')
-rw-r--r--coverage/backward.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/coverage/backward.py b/coverage/backward.py
index 03fa6512..e81dd199 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")