Closed alexandermalyga closed 3 years ago
PyCharm provides typehints on the result of .auth() .database() etc without importing everything. What IDE are you using?
Yes, I mean type hints that an user would write when using the library, for example:
from pyrebase import initialize_app, Firebase, Auth, Database, Storage
firebase: Firebase = initialize_app(FIREBASE_CONFIG)
auth: Auth = firebase.auth()
Since submitting the PR i've realized that an easy workaround would be to import the classes directly from the pyrebase module and not from the package, so that could be the alternative instead of the proposed changes in the PR.
Right, but I checked in pycharm and i get typehints as is with no changes.
On Tue, Dec 29, 2020 at 9:51 AM Alexander Malyga notifications@github.com wrote:
Yes, I mean type hints that an user would write when using the library, for example:
from pyrebase import initialize_app, Firebase, Auth, Database, Storagefirebase: Firebase = initialize_app(FIREBASE_CONFIG)auth: Auth = firebase.auth()
Since submitting the PR i've realized that an easy workaround would be to import the classes directly from the pyrebase module and not from the package, so that could be the alternative instead of the proposed changes in the PR.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nhorvath/Pyrebase4/pull/23#issuecomment-752106083, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABIJXEMXOQVDO6D7SN6GHDSXHUHTANCNFSM4VNFN7RA .
This adds imports of the Firebase, Auth, Database and Storage classes to __init__.py in order to be able to use them as type hints.