FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Further annotate sqlalchemy.engine and collections by srittau · Pull Request #6680 · python/typeshed · GitHub

Repository navigation

Further annotate sqlalchemy.engine and collections - #6680

Merged
Akuli merged 24 commits into
python:masterfrom
srittau:sqlalchemy-engine
Jan 9, 2022
Merged

Akuli merged 24 commits into
python:masterfrom
srittau:sqlalchemy-engine

Conversation

srittau commented Dec 24, 2021

Copy link
Copy Markdown
Collaborator

No description provided.

Akuli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I read about half of this in detail.

url: str
dialect: Dialect
logging_name: str # only exists if not None during initialization
echo: echo_property

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe this should be ClassVar, because the class has an instance of echo_property. Or just echo: _EchoFlag, since the underlying echo_property instance is an implementation detail?

srittau Jan 2, 2022 •
edited
Loading

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not sure how well class vars play together with the descriptor protocol. @property is usually not wrapped in ClassVar either.

I just tried to use just echo: _EchoFlag, and while it should work, stubtest complains, so I opted for the version that requires less stubtest overrides.

Akuli commented Dec 30, 2021

Copy link
Copy Markdown
Collaborator

It would be nice to see sqlalchemy-stubs types migrated here, because we can be confident they are already correct enough to be usable.

srittau commented Dec 30, 2021

Copy link
Copy Markdown
Collaborator Author

It would be nice to see sqlalchemy-stubs types migrated here, because we can be confident they are already correct enough to be usable.

That's my plan after migrating the stubs from https://github.com/srittau/python-stubs/tree/master/stubs/sqlalchemy. I know that the latter work for my use case. :)

srittau commented Dec 30, 2021

Copy link
Copy Markdown
Collaborator Author

(I will look at the other comments later/in the next few days.)

Akuli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sorry for taking so long to review the rest of this.

A couple thoughts:

  • There now seems to be 4 different sqlalchemy stubs out there: sqlalchemy-stubs, whatever zzzeek works on (python/typing#999), https://github.com/srittau/python-stubs, and the stubs in typeshed. Is this really a good thing?
  • This PR took a lot of time to review. I would have appreciated splitting it up into smaller pull requests.

Akuli merged commit 67c5d73 into python:master Jan 9, 2022
srittau deleted the sqlalchemy-engine branch January 9, 2022 17:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL