Showing posts with the label
mypy
Issue Lets say I want to declare an input type originating from an optional dependency of my librar…
Issue from typing import TypeVar T = TypeVar('T') class MyList: def __init__(self): …
Issue I'm trying to work out how to add a type annotation for a function argument that should b…
Issue Say you want to wrap the dataclass decorator like so: from dataclasses import dataclass de…
Issue Here is the problem: I have a dictionary that keeps track of two different types of values (…
Issue I have a function with multiple kwargs with defaults. One of them (in the middle somewhere) i…
Issue This answer does not seem to work for generics. Mypy complains about "error: Missing ty…
Issue I am writing a CustomEnum class in which I want to add some helper methods, that would then b…
Issue I have a function that creates a pyspark WindowSpec partitioning on either a single column or…
Issue I have the following code snippet: from typing import TypedDict class Super(TypedDict): …
Issue I have a function which takes a list of a base class as argument, and I have a variable which…
Issue Basically a distilled down version of this (as yet unanswered) question. I want to
Issue I'm having trouble getting MyPy to pass my script which contains a dataclass Bar with a…
Issue When I run mypy on the following code I get Need more than 2 values to unpack (3 expected)…
Issue I have a function that merge two list of either int or str. There cannot be a situation when …
Issue I have looked at a few SO posts and github issues related to using Typing with descriptors bu…
Issue I have a decorator that can be called either without or with arguments (all strings): @decor…
Issue When using an optional import, i.e. the package is only imported inside a function as I want…
Issue If I type slots: class Foo: __slots__: Tuple[()] = tuple() Then, in strict mode, mypy (…
Issue I have a variable path , which should be a tuple of strings. I want to start with it set to a…