8000 Disable universal newlines when reading TOML by hukkin · Pull Request #10893 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Disable universal newlines when reading TOML #10893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 1, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update mypy/modulefinder.py
Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
  • Loading branch information
ilevkivskyi and hukkin authored Dec 1, 2021
commit 5fee414b144a80d859ada2b33bff5efb43bb101e
4 changes: 2 additions & 2 deletions mypy/modulefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ def _is_compatible_stub_package(self, stub_dir: str) -> bool:
if os.path.isfile(metadata_fnam):
# Delay import for a possible minor performance win.
import tomli
with open(metadata_fnam, 'rb') as f:
metadata = tomli.load(f)
with open(metadata_fnam, encoding="utf-8") as f:
metadata = tomli.loads(f.read())
if self.python_major_ver == 2:
return bool(metadata.get('python2', False))
else:
Expand Down
0