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

Add a comment about _typeshed to VERSIONS #5447

Merged
merged 6 commits into from
May 19, 2021

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented May 14, 2021

Support inline comments in VERSIONS

@Akuli
Copy link
Collaborator

Akuli commented May 14, 2021

Personally I would prefer to keep the syntax as simple as we can. Several file formats, such as git commit message editing or /etc/fstab, support comments but require the # to be in the start of the line.

For _typeshed specifically, we already have a comment in _typeshed/__init__.pyi explaining what it is. If that's not enough, we can move it to _typeshed/README.md.

@srittau
Copy link
Collaborator Author

srittau commented May 14, 2021

Comments at the end of the line are a common standard. Even Python supports them. :) The reason why I want to comment on _typeshed specifically in VERSIONS is because it's also relevant here: VERSIONS is our "inventory" of Python's standard library packages, so it makes sense to me to clarify here that a package is not really part of Python.

@Akuli
Copy link
Collaborator

Akuli commented May 14, 2021

Seems like this needs changes in mypy

@Akuli Akuli added the status: deferred Issue or PR deferred until some precondition is fixed label May 14, 2021
@github-actions

This comment has been minimized.

@Akuli Akuli removed the status: deferred Issue or PR deferred until some precondition is fixed label May 16, 2021
if line == "":
continue
m = _VERSION_LINE_RE.match(line)
assert m, "invalid VERSIONS line :" + line
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit:

Suggested change
assert m, "invalid VERSIONS line :" + line
assert m, "invalid VERSIONS line: " + line

@srittau
Copy link
Collaborator Author

srittau commented May 16, 2021

The primer reports lots of issues, similar to #5473. I'll postpone this until that PR merged cleanly.

@JelleZijlstra
Copy link
Member

The primer reports lots of issues

I noticed that too, seemed like something related to third-party packages. I'll look at it for a while.

@JelleZijlstra
Copy link
Member

Looks like I broke typeshed CI with a mypy change I just merged. I'll fix it.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 54a0bd8 into python:master May 19, 2021
@srittau srittau deleted the versions-inline-comments branch May 19, 2021 09:01
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