Shantanu

Results 150 issues of Shantanu

This makes a couple related changes to inspect.signature's behaviour when parsing a signature from `__text_signature__`. First, `inspect.signature` is documented as only raising ValueError or TypeError. However, in some cases, we...

awaiting review
needs backport to 3.10
needs backport to 3.11

My clang-5.0(.1) has -Wzero-as-null-pointer-constant, but it's missing from this list.

**Describe the bug** ``` class X: def f(self): assert remove_color_code(output) == ( "error: not checking stubs due to mypy build errors:\n{}.pyi:2: " 'error: Name "f" already defined'.format(TEST_MODULE_NAME) ) ``` becomes...

T: bug
F: strings
C: preview style

Fixes #11925 This avoids mypy from guessing subtype relationships because of the any fallback over here: https://github.com/python/mypy/blob/e1bfb75ed2187db76d51ed875ce953da3ba4d02c/mypy/subtypes.py#L438

upnext

Currently mypy only suggests installing stub packages if they're from typeshed. This restriction is important, because package installation can result in arbitrary code execution; potentially automatically when using `--install-types`. However,...

feature

This was originally reported in https://github.com/python/mypy/issues/3644#issuecomment-825494986 ``` from typing import Callable, TypeVar, Generic, Union _U = TypeVar('_U') _T = TypeVar('_T') class Future(Generic[_T]): def __init__(self, t: _T): self._t = t def...

bug
topic-type-variables
topic-union-types

Fixes #13823. See also #6406

Fixes #4065, closes #4067, closes #4041 See comment in https://github.com/psf/black/pull/4041#issuecomment-1871863867 The two possible fixes are both not ideal. Changing the names of the stages guarantees that things will break with...