Skip to content

Commit

Permalink
chore: Export intended public imports
Browse files Browse the repository at this point in the history
It looks like MyPy and Pyright currently require imports like these to
be re-exported in order to be used. Doing this raises a lint error for
me due to Pyright:

```python
import aw_client

aw_client.ActivityWatchClient()  # "ActivityWatchClient" is not exported from module "aw_client"
```

Ref: https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface
Ref: microsoft/pyright#3409
Ref: python/mypy#8754 (comment)
  • Loading branch information
Jeremiah-England committed Sep 4, 2023
1 parent b8f256f commit b753e82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aw_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .client import ActivityWatchClient # noqa
from .client import ActivityWatchClient

__all__ = ("ActivityWatchClient",)

0 comments on commit b753e82

Please sign in to comment.