summaryrefslogtreecommitdiff
path: root/sphinx/directives/code.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-09-22 22:54:15 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-09-22 22:54:15 +0900
commitdc44b0d2a9c52b5c12843cb1a0a6e0aea3c7f4d2 (patch)
treeee090ebec55c1aa6c5b9e19bfbad1ae0bbfb8abe /sphinx/directives/code.py
parent490e4aed4145659dab000e86269bd7a3dc686318 (diff)
parentb4fab4bf115af984a82b9c509decc0d1c5fe1c41 (diff)
downloadsphinx-git-dc44b0d2a9c52b5c12843cb1a0a6e0aea3c7f4d2.tar.gz
Merge branch 'master' into HEAD
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r--sphinx/directives/code.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py
index 868787a14..e14a451d9 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -7,7 +7,6 @@
:license: BSD, see LICENSE for details.
"""
-import codecs
import sys
import warnings
from difflib import unified_diff
@@ -213,7 +212,8 @@ class LiteralIncludeReader:
def read_file(self, filename, location=None):
# type: (unicode, Any) -> List[unicode]
try:
- with codecs.open(filename, 'r', self.encoding, errors='strict') as f: # type: ignore # NOQA
+ with open(filename, 'r', # type: ignore
+ encoding=self.encoding, errors='strict') as f:
text = f.read() # type: unicode
if 'tab-width' in self.options:
text = text.expandtabs(self.options['tab-width'])