Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mypy/stubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ def generate_stub_for_py_module(
subdir = os.path.dirname(target)
if subdir and not os.path.isdir(subdir):
os.makedirs(subdir)
with open(target, "w") as file:
with open(target, "w", encoding="utf-8") as file:
file.write(output)


Expand Down
4 changes: 2 additions & 2 deletions test-data/unit/stubgen.test
Original file line number Diff line number Diff line change
Expand Up @@ -3485,7 +3485,7 @@ def f2(): ...
class A:
"""class docstring

a multiline docstring"""
a multiline 😊 docstring"""
def func():
"""func docstring
don't forget to indent"""
Expand All @@ -3512,7 +3512,7 @@ class B:
class A:
"""class docstring

a multiline docstring"""
a multiline 😊 docstring"""
def func() -> None:
"""func docstring
don't forget to indent"""
Expand Down