You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code works like this, but at least pylance can recognize that there is Timer, but does not recognize it as part of the public API:
Adding the following to the __init__.py would solve this.
# Use __all__ to let type checkers know what is part of the public API.__all__= ('Timer', 'TimerError')
I could make a PR for this. But then the question would arise whether __all__ should also be added in the modules and whether relative imports should be used in general?
The text was updated successfully, but these errors were encountered:
I don't think you need to define __all__ in _timer.py and _timers.py. They're not part of the public API.
I'm not sure I understand what you mean by "whether relative imports should be used in general?" I definitely prefer absolute imports over relative imports.
The code works like this, but at least pylance can recognize that there is
Timer
, but does not recognize it as part of the public API:Adding the following to the
__init__.py
would solve this.I could make a PR for this. But then the question would arise whether
__all__
should also be added in the modules and whether relative imports should be used in general?The text was updated successfully, but these errors were encountered: