-
This describes an issue where a generic decorator that returns a generic sub-type of a "callable" (using `__call__` and `ParamSpec`) cannot be applied to a generic function. In the example below, `Cal…
-
Hi
I would like to type a decorator which takes as input a class and returns the same class with added attributes, i.e., a subclass.
Example:
```py
import typing
_T = typing.TypeVar("_T")
…
-
Hey!
I saw this topic was already brought here a few times, so I excuse for doing this again, but I coulnd't find any workarounds and don't know what to do.
I am working on some sort of SDK with …
-
Using Jedi as Python Language Server for VSCode I have some issues I am seeing with autocomplete from a stubs module that has various overloads.
In the stubs module itself I see the decorators `@ty…
-
### Describe the bug
In langfuse_decorator.py there is a typing Callable, but mypy identify it as Any, therefore @observe changes original function/methods type.
```
# For users with mypy type c…
-
pyright's has experimental support for inline `TypedDict` syntax:
```py
foo: dict[{"foo": int}]
```
(although [it will probably be removed from pyright in the future](https://github.com/python/m…
-
I'm trying to make a simple typeahead. This might be incorrect but my current approach uses a `selectionContainsEntity` function which accepts a decorator strategy and the current editor state. If the…
-
Hi,
when I was trying you package with one of the newest versions of FastaAPI which depends on typing-extension >=4.8.0, I ran into a typing error in your code. It applies I believe only to python …
-
Hi. It seems that the typing of decorators is problematic with functions inside classes.
Suppose we want to see how many times a function has been called, we can write a simple decorator:
```pyt…
-
### Question:
Let's say we have the following function:
```python
def not_a_decorator(fn, /, *args, **kwargs):
# do some stuff
return fn(*args, **kwargs)
```
How would we go about…