Skip to content

randolf-scholz/dmypy_bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dmypy bug: Final name must be initialized with a value

Mypy currently does not support Final annotation on dataclasses (see mypy issue 5608). Therefore, the error message Final name must be initialized with a value is expected on MyDataclass in __init__.py. However, running dmypy check src a second time spreads this error message to ImmutablePoint.

python3.12 -m venv .venv
source .venv/bin/activate
pip install -e .
dmypy start
dmypy check src
dmypy check src  # second run

The first run should produce:

src/dmypy_final_bug/__init__.py:10: error: Final name must be initialized with a value  [misc]
src/dmypy_final_bug/__init__.py:11: error: Final name must be initialized with a value  [misc]
Found 2 errors in 1 file (checked 1 source file)

and the second run yields different results, spreading the error message:

src/dmypy_final_bug/__init__.py:10: error: Final name must be initialized with a value  [misc]
src/dmypy_final_bug/__init__.py:11: error: Final name must be initialized with a value  [misc]
src/dmypy_final_bug/__init__.py:15: error: Final name must be initialized with a value  [misc]
src/dmypy_final_bug/__init__.py:16: error: Final name must be initialized with a value  [misc]
Found 4 errors in 1 file (checked 1 source file)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages