Comments (2)
Thanks for reporting the bug!
Yeah, that sucks. It's on the unsupported feature list in the wiki, but at least there should be a proper error message.
from mypy.
Fixed in the git repo: there is now an error message indicating that class attribute are not supported yet.
However, the original example will not be valid mypy, since A.x refers to the value of A.x, not the type of A.x. So you have to say void __init__(self, int b):
(note also that the type of self is inferred). The declaration of b in the body of class A is optional, though.
from mypy.
Related Issues (20)
- Support for short-circuit evaluation HOT 8
- mypy does not check the code after the line with lambda function that calls NoReturn function HOT 8
- Base class type incorrectly overwritten by assignment in extending class HOT 1
- Disable third party imports only HOT 1
- False negative: `typing.Literal[<Union expression>]`
- Python 3.13 tracking issue
- mypy --strict doesn't handle wildcard imports of modules that do 'import foo as bar' HOT 4
- Follow imports still true even when mypy.ini ignores imports HOT 1
- Daemon mode mypy checks way more files the second time with the same command run
- Empty tuple type is expanded in truthy check instead of narrowed. HOT 3
- stubtest: `__all__` check seems to ignore `*.allowlist` files HOT 2
- cannot apply `@asynccontextmanager` to a function that uses `TypeVarTuple` HOT 2
- False positive: `Protocol member cannot be final` in non-instance assignment in a method HOT 3
- Variadic tuple unpacking requires a star target -- why? HOT 2
- 1.11 Release Tracking Issue HOT 8
- `Generator` return type and send type are treated as `None` under `allow-any-generics` HOT 3
- (false positive) Using `@final` decorator on a `Protocol` class results in an error in most cases HOT 3
- Descriptors that have different behavior on instance and class don't work with `no-strict-optional` HOT 1
- Simple `Literal` type narrowing via pattern matching is broken HOT 1
- return value of sorted() cannot be upcast HOT 1
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.