diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-16 02:17:32 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-16 09:43:58 +0900 |
| commit | a77f3519fa11793f939e4a28947e57df9afde793 (patch) | |
| tree | 07ace712b6137c3a878ff6ab309bbefbd35397dc /sphinx/pycode/__init__.py | |
| parent | 8c56fd87479291e2e6b901d3ed44e889d27801da (diff) | |
| download | sphinx-git-a77f3519fa11793f939e4a28947e57df9afde793.tar.gz | |
Fix mypy violations
Diffstat (limited to 'sphinx/pycode/__init__.py')
| -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: |
