Skip to content
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

Fix type errors by explicitly exporting vobject.readComponents? #53

Open
dbarnett opened this issue Aug 25, 2024 · 0 comments · May be fixed by #54
Open

Fix type errors by explicitly exporting vobject.readComponents? #53

dbarnett opened this issue Aug 25, 2024 · 0 comments · May be fixed by #54

Comments

@dbarnett
Copy link

I found type checking my code that uses vobject gave me an error for trying to use vobject.readComponents:

gcalcli/ics.py:24: error: Module "vobject" does not explicitly export attribute "readComponents"  [attr-defined]

Typeshed does supply types for the vobject module, but those don't declare readComponents at all. I think if you can make a trivial change here to explicitly export it then I can send a trivial PR to typeshed to regenerate using the new version.

The relevant mypy docs for "no-implicit-reexport" suggest one of these two changes to explicitly export:

  1. Add explicit alias as readComponents on the import
  2. Define __all__ = ['readComponents'...] on the file

WDYT?

@dbarnett dbarnett linked a pull request Aug 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant