Skip to content

TOML stubs incomplete #6484

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

Closed
mdjong1 opened this issue Dec 3, 2021 · 3 comments · Fixed by #7146
Closed

TOML stubs incomplete #6484

mdjong1 opened this issue Dec 3, 2021 · 3 comments · Fixed by #7146
Labels
stubs: incomplete Annotations or sub-modules missing from an existing package or module

Comments

@mdjong1
Copy link

mdjong1 commented Dec 3, 2021

We recently ran into an issue with the TOML stub related to the TomlDecodeError. Mypy threw this one at us: "TomlDecodeError" has no attribute "msg". This appears to originate from types-toml, which is maintained from https://github.com/python/typeshed/tree/master/stubs/toml. But it seems that the definition of TomlDecodeError there does not include any of the original class variables, thus generating this error.

Adding this issue for tracking, will possibly update these stubs ourselves in the near future.

@srittau srittau added the stubs: incomplete Annotations or sub-modules missing from an existing package or module label Dec 3, 2021
@mdjong1
Copy link
Author

mdjong1 commented Dec 3, 2021

I just noticed that toml nowadays includes it's correct typing, so perhaps it should be moved out from here?
https://github.com/uiri/toml/blob/master/toml/decoder.pyi

@Akuli
Copy link
Collaborator

Akuli commented Dec 3, 2021

Afaik toml is no longer maintained: #6022

@srittau
Copy link
Collaborator

srittau commented Dec 3, 2021

The latest released version of toml doesn't include stubs, so our stubs are still required. But as Akuli mentioned, toml seems to be not longer maintained and I would recommend to switch to tomli. That said, we accept PRs to improve our toml stubs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: incomplete Annotations or sub-modules missing from an existing package or module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants