Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add test and docs for top levelmypy: disable-error-code comment#14810

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hauntsaninja merged 3 commits intomasterfromissue-14750
Mar 1, 2023

Conversation

@sobolevn
Copy link
Member

I went with the smallest change possible.
@xitop, please, take a look. Does it make sense to you? :)

Closes#14750

Copy link
Collaborator

@hauntsaninjahauntsaninja left a comment

Choose a reason for hiding this comment

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

This looks good, could you also update the error message here:

"use `# mypy: disable-error-code=...`"

@xitop
Copy link

I went with the smallest change possible.@xitop, please, take a look. Does it make sense to you? :)

Yes, looks fine. Thank you for your work. But regarding the typing and using mypy I'm a beginner, so don't count on my opinion too much.

@sobolevn
Copy link
MemberAuthor

@xitop beginners provide the best feedback for the docs! Thank you for the report 👍

@sobolevn
Copy link
MemberAuthor

@hauntsaninja we now have smart error message, thanks for the suggestion :)

andself.type_ignores
andmin(self.type_ignores)<self.get_lineno(stmts[0])
):
ifself.type_ignores[min(self.type_ignores)]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can't use walrus just yet; we still support 3.7

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is the first time I've used walrus in real code :)
Probably, the last time.

@github-actions
Copy link
Contributor

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

@hauntsaninjahauntsaninja merged commitc245e91 intomasterMar 1, 2023
@hauntsaninjahauntsaninja deleted the issue-14750 branchMarch 1, 2023 08:48
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@hauntsaninjahauntsaninjahauntsaninja approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

# mypy: disable-error-code=... usage details not documented

4 participants

@sobolevn@xitop@hauntsaninja

[8]ページ先頭

©2009-2025 Movatter.jp