-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into fix-nested-deferral
- Loading branch information
Showing
93 changed files
with
1,253 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ Dropbox core team: | |
|
||
Non-Dropbox core team members: | ||
|
||
Ethan Smith | ||
Emma Harper Smith <[email protected]> | ||
Guido van Rossum <[email protected]> | ||
Jelle Zijlstra <[email protected]> | ||
Michael J. Sullivan <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
misc/typeshed_patches/0001-Partially-revert-Clean-up-argparse-hacks.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From b5f2cc9633f9f6cd9326eee96a32efb3aff70701 Mon Sep 17 00:00:00 2001 | ||
From: Marc Mueller <[email protected]> | ||
Date: Sat, 15 Feb 2025 20:11:06 +0100 | ||
Subject: [PATCH] Partially revert Clean up argparse hacks | ||
|
||
--- | ||
mypy/typeshed/stdlib/argparse.pyi | 8 +++++--- | ||
1 file changed, 5 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/mypy/typeshed/stdlib/argparse.pyi b/mypy/typeshed/stdlib/argparse.pyi | ||
index 029bfeefe..9dbd8c308 100644 | ||
--- a/mypy/typeshed/stdlib/argparse.pyi | ||
+++ b/mypy/typeshed/stdlib/argparse.pyi | ||
@@ -2,7 +2,7 @@ import sys | ||
from _typeshed import SupportsWrite, sentinel | ||
from collections.abc import Callable, Generator, Iterable, Sequence | ||
from re import Pattern | ||
-from typing import IO, Any, ClassVar, Final, Generic, NoReturn, Protocol, TypeVar, overload | ||
+from typing import IO, Any, ClassVar, Final, Generic, NewType, NoReturn, Protocol, TypeVar, overload | ||
from typing_extensions import Self, TypeAlias, deprecated | ||
|
||
__all__ = [ | ||
@@ -38,7 +38,9 @@ ONE_OR_MORE: Final = "+" | ||
OPTIONAL: Final = "?" | ||
PARSER: Final = "A..." | ||
REMAINDER: Final = "..." | ||
-SUPPRESS: Final = "==SUPPRESS==" | ||
+_SUPPRESS_T = NewType("_SUPPRESS_T", str) | ||
+SUPPRESS: _SUPPRESS_T | str # not using Literal because argparse sometimes compares SUPPRESS with is | ||
+# the | str is there so that foo = argparse.SUPPRESS; foo = "test" checks out in mypy | ||
ZERO_OR_MORE: Final = "*" | ||
_UNRECOGNIZED_ARGS_ATTR: Final = "_unrecognized_args" # undocumented | ||
|
||
@@ -81,7 +83,7 @@ class _ActionsContainer: | ||
# more precisely, Literal["?", "*", "+", "...", "A...", "==SUPPRESS=="], | ||
# but using this would make it hard to annotate callers that don't use a | ||
# literal argument and for subclasses to override this method. | ||
- nargs: int | str | None = None, | ||
+ nargs: int | str | _SUPPRESS_T | None = None, | ||
const: Any = ..., | ||
default: Any = ..., | ||
type: _ActionType = ..., | ||
-- | ||
2.48.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.