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

Improve attrs hashability detection#16556

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
sobolevn merged 5 commits intopython:masterfromTinche:tin/fix-attrs-hash
Dec 12, 2023
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Tweak default hashability test
  • Loading branch information
@Tinche
Tinche committedDec 9, 2023
commit30c3c5a216271140ee920f7d7ddaf7c0fe8fb471
7 changes: 1 addition & 6 deletionstest-data/unit/check-plugin-attrs.test
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2330,12 +2330,7 @@ from attrs import define
class A:
a: int

a: Hashable = A(1)

[out]
main:8: error: Incompatible types in assignment (expression has type "A", variable has type "Hashable")
main:8: note: Following member(s) of "A" have conflicts:
main:8: note: __hash__: expected "Callable[[], int]", got "None"
reveal_type(A.__hash__) # N: Revealed type is "None"

[builtins fixtures/plugin_attrs.pyi]
[typing fixtures/typing-full.pyi]
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp