Skip to content

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

@dbarnett

Description

@dbarnett

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions