8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6ddd45 commit f20cb87Copy full SHA for f20cb87
mypy/stubgen.py
100644
100755
@@ -200,8 +200,8 @@ def generate_stub(path: str,
200
pyversion: Tuple[int, int] = defaults.PYTHON3_VERSION,
201
include_private: bool = False
202
) -> None:
203
- with open(path, 'rb') as f:
204
- source = f.read()
+
+ source, _ = mypy.build.read_with_python_encoding(path, pyversion)
205
options = MypyOptions()
206
options.python_version = pyversion
207
try:
0 commit comments