This repository was archived by the owner on May 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -108,20 +108,19 @@ $ pyright .
108108
109109---
110110
111- ### Mypy (without NumType)
111+ ### Mypy ` 2.2.5 ` (without NumType)
112112
113113NumType: No
114114
115115``` bash
116116$ rm -rf .mypy_cache
117117$ mypy .
118118main.pyi:3: note: Revealed type is " numpy.bool[Literal[True]]"
119- Success: no issues found in 1 source file
120119```
121120
122121` numpy.bool ` => NumPy's bundled stubs are used :white_check_mark :
123122
124- ### Mypy (with NumType)
123+ ### Mypy ` 2.2.5 ` (with NumType)
125124
126125``` bash
127126$ rm -rf .mypy_cache
@@ -131,6 +130,22 @@ main.pyi:3: note: Revealed type is "numpy.bool[Literal[True]]"
131130
132131` numpy.bool ` => NumPy's bundled stubs are used :x :
133132
133+ ### Mypy (` jorenham:fix-18997 ` ) (with NumType)
134+
135+ Install the PR branch with the fix (python/mypy #19001 ):
136+
137+ ``` bash
138+ uv pip install " git+https://github.com/jorenham/mypy@fix-18997"
139+ ```
140+
141+ ``` bash
142+ $ rm -rf .mypy_cache
143+ $ mypy main.pyi
144+ main.pyi:3: note: Revealed type is " numpy.bool_[Literal[True]]"
145+ ```
146+
147+ ` numpy.bool_ ` => NumType's ` numpy-stubs ` are used :white_check_mark :
148+
134149## The nuclear workaround
135150
136151<details >
You can’t perform that action at this time.
0 commit comments