Ivan Levkivskyi

Results 436 comments of Ivan Levkivskyi

Yeah, the fact that old behavior worked "better" for variable redefinition is a pure coincidence. If you really want variable redefinition semantics you can try either `--allow-redefinition` (older but more...

> Using a NamedTuple subclass, subclass it with a `__new__` override to provide standard parameters. Use instead: ```python class Foo(NamedTuple): x: int y: int = 0 Foo(1) # OK, same...

The super error is unrelated, it is just typeshed problem, `str` doesn't have `__new__` there.

This now typechecks without errors (it would however infer imprecise type without annotation, I will open a separate issue for this).

`mypy_primer` looks good.

@JukkaL Yeah, I was thinking about adding some more detailed docs on instance vs class vars in general (not just generic ones). I will do this separately.

I will try to look at this on the weekend, there indeed may be a deeper problem.

@tyralla I think I fixed the bug in https://github.com/python/mypy/pull/17883. Please undo your `CrossRef` change. Also please add a test like this: ``` [case testDeprecateFunctionAlreadyDecorated] from b import f x: str...

I just literally did what mypy suggested and it worked: ``` $ mypy a/setup.py b/setup.py b/setup.py: error: Duplicate module named "setup" (also at "a/setup.py") b/setup.py: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules for more...

Rules for overload overlaps have been relaxed (even allowing some actual unsafe definitions). The original example is now allowed because the arg names (`b` vs `c`) are different.