Skip to content

issues Search Results · repo:python/mypy language:Python

Filter by

11k results
 (90 ms)

11k results

inpython/mypy (press backspace or delete to remove)

Feature When a class defines __eq__, Mypy understandably bails out of ever considering that class as statically non-overlapping with another. IOW, class A: pass class B: pass A() == B() goes ...
feature
  • akx
  • Opened 
    7 hours ago
  • #19595

In general, I d assume x: T | U = e to succeed without error if e is assignable to either T or U. In the below code, the dict literal is not assignable to the typed dict TD, but it is assignable to dict[str, ...
bug
topic-type-context
topic-typed-dict
  • samwgoldman
  • Opened 
    yesterday
  • #19590

Bug Report To Reproduce https://mypy-play.net/?mypy=latest python=3.12 flags=disallow-any-decorated gist=876af123e45fe566785e35c9e0b22821 import contextlib exit_stack = contextlib.ExitStack() def enter_context() ...
bug
topic-disallow-any
  • grayjk
  • Opened 
    yesterday
  • #19589

Bug Report Relates to #18474 To Reproduce https://mypy-play.net/?mypy=latest python=3.12 gist=0a111ec53847f83b14902de3a7aec37b This code does not produce a deprecated error: # mypy: enable-error-code ...
bug
topic-pep-702
  • grayjk
  • 1
  • Opened 
    yesterday
  • #19588

from typing import Self, TypeVar, reveal_type class A: def f(self,) - Self: return self class B: def f(self,) - Self: return self T = TypeVar( T , bound=A | B) def g(arg: ...
bug
topic-self-types
topic-type-variables
topic-union-types
  • jorgefandinno
  • Opened 
    yesterday
  • #19584

Bug Report, To Reproduce, and Actual Behaviour If the enum member s name to compare isn t equal to the comparing value, a false positive comparison-overlap is triggered. See [mypy Playground](https://mypy-play.net/?mypy=master ...
bug
false-positive
topic-enum
topic-literal-types
topic-overlap
  • bzoracler
  • Opened 
    2 days ago
  • #19576

Bug Report Using TypeGuard or TypeIs on the __call__ method on an object that is created in the if statement is broken. To Reproduce from typing import TypeGuard class E: def __init__(self) - ...
bug
topic-type-narrowing
topic-typeguard-typeis
  • saulshanabrook
  • Opened 
    3 days ago
  • #19575

!-- Use this form only if mypy reports an INTERNAL ERROR and/or gives a traceback. Please include the traceback and all other messages below (use mypy --show-traceback). Crash Report Running latest ...
crash
topic-descriptors
  • Avasam
  • 4
  • Opened 
    3 days ago
  • #19572

We could try to get all the Anys out of mypy/config_parser.py, which would prevent other configuration-file type-error crashes. (We will presumably still error, but could emit a friendlier message, as ...
topic-developer
  • wyattscarpenter
  • Opened 
    3 days ago
  • #19566

Hello, Is this normal ? code ` from functools import singledispatch from typing import Any @singledispatch def test[T: Any](val: T)- None: print( default ) @test.register def _(val: str) - None: print( ...
bug
  • ruomad
  • 1
  • Opened 
    4 days ago
  • #19564
Issue origami icon

Learn how you can use GitHub Issues to plan and track your work.

Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub Issues
ProTip! 
Press the
/
key to activate the search input again and adjust your query.
Issue origami icon

Learn how you can use GitHub Issues to plan and track your work.

Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub Issues
ProTip! 
Press the
/
key to activate the search input again and adjust your query.
Issue search results · GitHub