diff options
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r-- | sphinx/directives/code.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index a98ab5883..ec389e708 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(object): 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']) |