diff options
Diffstat (limited to 'sphinx/pycode')
| -rw-r--r-- | sphinx/pycode/__init__.py | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py index 3e70e28ce..8561169b5 100644 --- a/sphinx/pycode/__init__.py +++ b/sphinx/pycode/__init__.py @@ -32,8 +32,8 @@ class ModuleAnalyzer(object):      def for_string(cls, string, modname, srcname='<string>'):          # type: (unicode, unicode, unicode) -> ModuleAnalyzer          if isinstance(string, bytes): -            return cls(BytesIO(string), modname, srcname)  # type: ignore -        return cls(StringIO(string), modname, srcname, decoded=True)  # type: ignore +            return cls(BytesIO(string), modname, srcname) +        return cls(StringIO(string), modname, srcname, decoded=True)      @classmethod      def for_file(cls, filename, modname): @@ -42,7 +42,7 @@ class ModuleAnalyzer(object):              return cls.cache['file', filename]          try:              with open(filename, 'rb') as f: -                obj = cls(f, modname, filename)  # type: ignore +                obj = cls(f, modname, filename)                  cls.cache['file', filename] = obj          except Exception as err:              if '.egg/' in filename:  | 
