-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ParamSpec
in freezegun
stubs
#7053
Conversation
def __enter__(self) -> FrozenDateTimeFactory | StepTickTimeFactory: ... | ||
def __exit__(self, *args: Any) -> None: ... | ||
def start(self) -> Any: ... | ||
def stop(self) -> None: ... | ||
def decorate_class(self, klass: type[_T]) -> _T: ... | ||
def decorate_coroutine(self, coroutine: _T) -> _T: ... | ||
def decorate_callable(self, func: Callable[..., _T]) -> Callable[..., _T]: ... | ||
def decorate_callable(self, func: Callable[_P, _T]) -> Callable[_P, _T]: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't correct: if as_arg or as_kwarg is given, it injects an additional arg/kwarg. https://github.com/spulec/freezegun/blob/8994558274161b527ab83a3b13ea5969e9ebd144/freezegun/api.py#L783
This also applies to the __call__
overload for functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Best to leave it until we have Concatenate
support, then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not enough for the kwarg.
I also noticed the library has a py.typed, so we may be able to remove the stubs at some point. |
^We can't, that's just the unreleased master branch, no released version has a |
We already have an issue for that: #5842. |
No description provided.