Skip to content

Conversation

@kojiromike
Copy link
Contributor

This PR updates stubs to recognize new attributes added since the
original stubbing in #5784.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thank you for updating the stubs! A few remarks below.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thank you for the fixes. Two minor issues below then this is good to go!

@kojiromike kojiromike force-pushed the update-jsonschema-stubs branch 2 times, most recently from a95597d to 4ad187c Compare December 6, 2021 15:34
@Akuli
Copy link
Collaborator

Akuli commented Dec 6, 2021

Nit: Avoid git rebase and --amend, so that you don't have to force-push. After force-pushing, it is hard to see what changed since the previous review. We use GitHub's "Squash and merge" button, which makes the whole PR appear as a single commit, regardless of how messy the commit history within the PR was.

@kojiromike kojiromike force-pushed the update-jsonschema-stubs branch from 4ad187c to 50b96cc Compare December 6, 2021 15:52
As recommended by @Akuli
@kojiromike
Copy link
Contributor Author

Avoid git rebase and --amend, so that you don't have to force-push.

Noted, I'll do that in the future.

@kojiromike kojiromike force-pushed the update-jsonschema-stubs branch from 7236a0c to 0c7803c Compare December 6, 2021 16:00
@kojiromike
Copy link
Contributor Author

Derp. I've updated my git local configuration to avoid needing to force push in this repo. Sorry for the error.

@srittau srittau merged commit 6c9efba into python:master Dec 6, 2021
def is_ipv4(instance) -> bool: ...
def is_ipv6(instance) -> bool: ...

# is_host_name is only defined if fqdn is installed.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: It would be better to put these comments to the allowlist. You can add comments to end of line, e.g.

jsonschema._format.is_host_name  # defined only if fqdn is installed

Copy link
Collaborator

Choose a reason for hiding this comment

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

I actually like them in the source file as well as the allowlist is basically invisible when developing with the stubs, while the comment in the source are visible when jumping into the stub file.

@kojiromike kojiromike deleted the update-jsonschema-stubs branch December 6, 2021 16:35
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