Skip to content

Conversation

ericbn
Copy link
Contributor

@ericbn ericbn commented Oct 28, 2024

No need to re-import datetime as datetime_lib inside __init__, just import it as that in the outer scope once.
Import the typing members directly.

No need to re-import datetime as datetime_lib inside __init__, just
import it as that in the outer scope once.
Import the typing members directly.
Copy link
Member

@tasn tasn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ericbn, thanks for the contributions! These changes are unfortunately very subjective, and they are different to our stylistic choices at Svix. We follow the t for typing and prefer not to rename when importing. So the previous version is more suitable for us.

@ericbn
Copy link
Contributor Author

ericbn commented Oct 28, 2024

We follow the t for typing and prefer not to rename when importing.

Hi @tasn. I sure can revert the changes in the typing import.

Regarding not renaming, you're already doing from datetime import datetime as datetime_lib inside __init__, because the argument is called datetime. I'd argue it's simpler to do that same from datetime import datetime as datetime_lib in the main scope, instead of hiding the first datetime import with the datetime argument and then importing datetime as datetime_lib every time again inside __init__.

EDIT: Just reverted the changes to the typing import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants