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

Edit error marker comments on some tests#2048

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

Open
yangdanny97 wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromyangdanny97:edit-error-comments

Conversation

yangdanny97
Copy link
Contributor

See inline comments for why

@@ -23,8 +23,13 @@ class Color(Enum):
# > constructor. Instead, the call performs a value-based lookup of an
# > enum member.

assert_type(Color["RED"], Color) # 'Literal[Color.RED]' is also acceptable
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

felt odd to assert_type here and say that another type is also acceptable. I tried to put both versions down, so that type checkers have discretion on which one to implement w/o the test failing.

I assume that if a checker emits an error on both lines the test will fail - could the maintainers please confirm this assumption?

Choose a reason for hiding this comment

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

That's right; this is documented in the "Test case syntax" section in conformance/README.

yangdanny97 reacted with thumbs up emoji
@@ -65,7 +65,7 @@ def method3() -> None: # E[method3]
pass

@overload # E[method4]
def method4(self, x: int) -> int:
def method4(self, x: int) -> int: # E[method4]
Copy link
ContributorAuthor

@yangdanny97yangdanny97Jul 18, 2025
edited
Loading

Choose a reason for hiding this comment

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

Pyrefly emits diagnostics on the line of thedef, not the line with the@overload

This is similar to what I did in#1980

JelleZijlstra reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JelleZijlstraJelleZijlstraJelleZijlstra 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.

2 participants
@yangdanny97@JelleZijlstra

[8]ページ先頭

©2009-2025 Movatter.jp