Comments (2)
Doesn't look like it to me.
That issue is about allowing redefinition when using --allow-redefinition
when the lifetimes don't overlap.
This issue is about inferring the variable as the union of the types from the branches and about being consistent in behavior, regardless in which way the condition is written.
from mypy.
Possibly a duplicate of #6232 ?
from mypy.
Related Issues (20)
- torch-nn-functional-mypy-bug-when-torchvision-installed
- dmypy crashes from RecursionError for some complex expressions (fastparse) HOT 1
- PEP 695 variance inferred as simultaneously covariant and contravariant HOT 2
- False negative for invalid abstractmethod implementation
- False negative when accessing dataclass instance attribute as class attribute HOT 2
- Basic checking of format string compatibility in f-strings HOT 2
- Mypy errors on code that's trivial syntactic transformation of code that it does not error on
- AssertionError: Must not defer during final iteration
- [good-first-issue] Expose the change log via Sphinx docs HOT 6
- [maintenance] Upgrade the use of `pip-tools` to leverage its modern features
- support for easy limiting of literals to entrypoint names and/or the entrypoint lookup value
- False Positive when assigning to union type as dictionary key
- Feature Request: Support for Enabling/Disabling Specific Error Codes similar to Pylint
- Passing self to a generic function that accepts Self HOT 1
- `stubgen --inspect-mode` fails while non-inspect mode works ok
- Another circular import in `mypy/test/testreports.py` HOT 3
- Incorrect type narrowing for `x in y` pattern when `x` is `type[T]` and `y` is an iterable of class objects
- False positive: `Type` objects (including `type[cls]`) are incompatible with `Hashable`
- Attributes without a default cannot follow attributes with one
- Unexpected Errors When Using Invariant, Covariant, and Contravariant Type Variables in Protocols for `__class_getitem__` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mypy.