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

Commitca738e5

Browse files
authored
Micro-optimization: Avoid temporary set creation in is_proper_subtype (#19463)
This was suggested by@sterliakov in#19384 (comment)This is a part of a set of micro-optimizations that improve self checkperformance by ~5.5%.
1 parent6f7d716 commitca738e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎mypy/subtypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ def is_proper_subtype(
217217
keep_erased_types=keep_erased_types,
218218
)
219219
else:
220-
assertnotany(
221-
{ignore_promotions,erase_instances,keep_erased_types}
220+
assert (
221+
notignore_promotionsandnoterase_instancesandnotkeep_erased_types
222222
),"Don't pass both context and individual flags"
223223
iftype_state.is_assumed_proper_subtype(left,right):
224224
returnTrue

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp