Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the generated package description #150

Merged
merged 5 commits into from
Oct 19, 2024
Merged

Conversation

srittau
Copy link
Contributor

@srittau srittau commented Oct 19, 2024

Reshuffle the sentences: The intro now contains the most important
information for users: a general description, the upstream version,
and the tested type checker versions. General information about
typeshed, bug tracker info, and metadata (the commit hash) was
moved to the outro. Additional information (extra description, the
notice that a package is obsolete) remains between the intro and
outro.

Also explicitly mention the typeshed project (in the outro) and
hide URLs in labeled links.

Reshuffle the sentences: The intro now contains the most important
information for users: a general description, the upstream version,
and the tested type checker versions. General information about
typeshed, bug tracker info, and metadata (the commit hash) was
moved to the outro. Additional information (extra description, the
notice that a package is obsolete) remains between the intro and
outro.

Also explicitly mention the typeshed project (in the outro) and
hide URLs in labeled links.
@srittau
Copy link
Contributor Author

srittau commented Oct 19, 2024

Before:


Typing stubs for psycopg2

This is a PEP 561 type stub package for the psycopg2 package. It can be used by type-checking tools like mypy, pyright, pytype, PyCharm, etc. to check code that uses psycopg2.

This version of types-psycopg2 aims to provide accurate annotations for psycopg2~=2.9.10. The source for this package can be found at https://github.com/python/typeshed/tree/main/stubs/psycopg2. All fixes for types and metadata should be contributed there.

See https://github.com/python/typeshed/blob/main/README.md for more details. This package was generated from typeshed commit b2f68ec2feff500ea9e8983396cead54218bb99c and was tested with mypy 1.11.2, pyright 1.1.385, and pytype 2024.10.11.


After:


Typing stubs for psycopg2

This is a PEP 561 type stub package for the psycopg2 package. It can be used by type-checking tools like mypy, pyright,
pytype, PyCharm, etc. to check code that uses psycopg2.

This version of types-psycopg2 aims to provide accurate annotations for psycopg2~=2.9.10 and was tested with mypy 1.11.2, pyright 1.1.385, and pytype 2024.10.11.

This package is part of the typeshed project. All fixes for types and metadata should be contributed there. See the README for more details. The source for this package can be found in the stubs/psycopg2 directory.

This package was generated from typeshed commit b2f68ec2feff500ea9e8983396cead54218bb99c.

Copy link
Contributor

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Much cleaner!

The source for this package can be found at
https://github.com/python/typeshed/tree/main/stubs/{distribution}. All fixes for
types and metadata should be contributed there.
for `{distribution}{typeshed_version_spec}` and was tested
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel this may be putting too much emphasis on the type checker versions we test with. There are occasional exceptions, but most stubs are going to work fine with older versions. Maybe move the info about type checker versions further down to where we mention the typeshed commit?

Also, a bit further up (can't comment there), we mention a list of type checkers; feels like we should also mention Pyre there.

Copy link
Contributor

@AlexWaygood AlexWaygood Oct 19, 2024

Choose a reason for hiding this comment

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

Last time I suggested mentioning Pyre, the objection was that we don't test Pyre in CI: #84 (comment). But I'm certainly still in favour of mentioning it.

Copy link
Contributor Author

@srittau srittau Oct 19, 2024

Choose a reason for hiding this comment

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

New take:


Typing stubs for psycopg2

This is a PEP 561 type stub package for the psycopg2 package. It can be used by type-checking tools like mypy, pyright, pytype, Pyre, PyCharm, etc. to check code that uses psycopg2. This version of types-psycopg2 aims to provide accurate annotations for psycopg2~=2.9.10.

... additional info (if any) ...

This package is part of the typeshed project. All fixes for types and metadata should be contributed there. See the README for more details. The source for this package can be found in the stubs/psycopg2 directory.

This package was tested with mypy 1.11.2, pyright 1.1.385, and pytype 2024.10.11. It was generated from typeshed commit b2f68ec2feff500ea9e8983396cead54218bb99c.

@srittau srittau merged commit 0ef6e45 into main Oct 19, 2024
6 checks passed
@srittau srittau deleted the improve-description branch October 19, 2024 15:37
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.

3 participants