Skip to content

pendulum.parse is not marked as exported (pyright type checker in VSCode) #595

Closed
@rnovacek

Description

@rnovacek
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

pyright type checker in VSCode reports a reportPrivateImportUsage error on following:

import pendulum
pendulum.parse('')

According to pyright docs "Imported symbols are considered private by default." Which is the case of pendulum.parse.

It seems that simply changing the line to named export resolves the problem.

-from .parser import parse
+from .parser import parse as parse

This is the case for all imported symbols, but I came across it on pendulum.parse. I'm aware it's probably just pyright-specific issue, so I'm reporting it as Feature Request. I'm also willing to create a PR if you consider this a valid request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions