-
-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default values to Context and RootValue type vars (#3732)
* Add default values to Context and RootValue type vars * Mypy * Use stable version of mypy * Remove cache from lint * Fix mypy * Fix lint * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Revert * Test * Test * Add release file * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
633c9bc
commit 71ac2d6
Showing
10 changed files
with
321 additions
and
221 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Release type: patch | ||
|
||
This release updates the Context and RootValue vars to have | ||
a default value of `None`, this makes it easier to use the views | ||
without having to pass in a value for these vars. |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
from typing import TypeVar | ||
from typing_extensions import TypeVar | ||
|
||
Request = TypeVar("Request", contravariant=True) | ||
Response = TypeVar("Response") | ||
SubResponse = TypeVar("SubResponse") | ||
WebSocketRequest = TypeVar("WebSocketRequest") | ||
WebSocketResponse = TypeVar("WebSocketResponse") | ||
Context = TypeVar("Context") | ||
RootValue = TypeVar("RootValue") | ||
Context = TypeVar("Context", default=None) | ||
RootValue = TypeVar("RootValue", default=None) | ||
|
||
|
||
__all__ = [ | ||
"Context", | ||
"Request", | ||
"Response", | ||
"RootValue", | ||
"SubResponse", | ||
"WebSocketRequest", | ||
"WebSocketResponse", | ||
"Context", | ||
"RootValue", | ||
] |
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