sqlglot-mypy 1.19.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1725) hide show
  1. sqlglot_mypy-1.19.1/CHANGELOG.md +4191 -0
  2. sqlglot_mypy-1.19.1/LICENSE +264 -0
  3. sqlglot_mypy-1.19.1/MANIFEST.in +52 -0
  4. sqlglot_mypy-1.19.1/PKG-INFO +54 -0
  5. sqlglot_mypy-1.19.1/README.md +190 -0
  6. sqlglot_mypy-1.19.1/build-requirements.txt +4 -0
  7. sqlglot_mypy-1.19.1/conftest.py +19 -0
  8. sqlglot_mypy-1.19.1/docs/Makefile +177 -0
  9. sqlglot_mypy-1.19.1/docs/README.md +49 -0
  10. sqlglot_mypy-1.19.1/docs/make.bat +242 -0
  11. sqlglot_mypy-1.19.1/docs/requirements-docs.txt +5 -0
  12. sqlglot_mypy-1.19.1/docs/source/additional_features.rst +483 -0
  13. sqlglot_mypy-1.19.1/docs/source/builtin_types.rst +96 -0
  14. sqlglot_mypy-1.19.1/docs/source/changelog.md +3 -0
  15. sqlglot_mypy-1.19.1/docs/source/cheat_sheet_py3.rst +399 -0
  16. sqlglot_mypy-1.19.1/docs/source/class_basics.rst +401 -0
  17. sqlglot_mypy-1.19.1/docs/source/command_line.rst +1291 -0
  18. sqlglot_mypy-1.19.1/docs/source/common_issues.rst +860 -0
  19. sqlglot_mypy-1.19.1/docs/source/conf.py +297 -0
  20. sqlglot_mypy-1.19.1/docs/source/config_file.rst +1275 -0
  21. sqlglot_mypy-1.19.1/docs/source/duck_type_compatibility.rst +33 -0
  22. sqlglot_mypy-1.19.1/docs/source/dynamic_typing.rst +135 -0
  23. sqlglot_mypy-1.19.1/docs/source/error_code_list.rst +1365 -0
  24. sqlglot_mypy-1.19.1/docs/source/error_code_list2.rst +701 -0
  25. sqlglot_mypy-1.19.1/docs/source/error_codes.rst +118 -0
  26. sqlglot_mypy-1.19.1/docs/source/existing_code.rst +254 -0
  27. sqlglot_mypy-1.19.1/docs/source/extending_mypy.rst +248 -0
  28. sqlglot_mypy-1.19.1/docs/source/faq.rst +211 -0
  29. sqlglot_mypy-1.19.1/docs/source/final_attrs.rst +237 -0
  30. sqlglot_mypy-1.19.1/docs/source/generics.rst +1437 -0
  31. sqlglot_mypy-1.19.1/docs/source/getting_started.rst +345 -0
  32. sqlglot_mypy-1.19.1/docs/source/html_builder.py +85 -0
  33. sqlglot_mypy-1.19.1/docs/source/index.rst +119 -0
  34. sqlglot_mypy-1.19.1/docs/source/inline_config.rst +43 -0
  35. sqlglot_mypy-1.19.1/docs/source/installed_packages.rst +196 -0
  36. sqlglot_mypy-1.19.1/docs/source/kinds_of_types.rst +740 -0
  37. sqlglot_mypy-1.19.1/docs/source/literal_types.rst +525 -0
  38. sqlglot_mypy-1.19.1/docs/source/metaclasses.rst +117 -0
  39. sqlglot_mypy-1.19.1/docs/source/more_types.rst +1006 -0
  40. sqlglot_mypy-1.19.1/docs/source/mypy_daemon.rst +380 -0
  41. sqlglot_mypy-1.19.1/docs/source/mypy_light.svg +99 -0
  42. sqlglot_mypy-1.19.1/docs/source/protocols.rst +629 -0
  43. sqlglot_mypy-1.19.1/docs/source/running_mypy.rst +587 -0
  44. sqlglot_mypy-1.19.1/docs/source/runtime_troubles.rst +358 -0
  45. sqlglot_mypy-1.19.1/docs/source/stubgen.rst +199 -0
  46. sqlglot_mypy-1.19.1/docs/source/stubs.rst +132 -0
  47. sqlglot_mypy-1.19.1/docs/source/stubtest.rst +229 -0
  48. sqlglot_mypy-1.19.1/docs/source/supported_python_features.rst +20 -0
  49. sqlglot_mypy-1.19.1/docs/source/type_inference_and_annotations.rst +296 -0
  50. sqlglot_mypy-1.19.1/docs/source/type_narrowing.rst +567 -0
  51. sqlglot_mypy-1.19.1/docs/source/typed_dict.rst +328 -0
  52. sqlglot_mypy-1.19.1/mypy/__init__.py +1 -0
  53. sqlglot_mypy-1.19.1/mypy/__main__.py +37 -0
  54. sqlglot_mypy-1.19.1/mypy/api.py +94 -0
  55. sqlglot_mypy-1.19.1/mypy/applytype.py +304 -0
  56. sqlglot_mypy-1.19.1/mypy/argmap.py +269 -0
  57. sqlglot_mypy-1.19.1/mypy/binder.py +630 -0
  58. sqlglot_mypy-1.19.1/mypy/bogus_type.py +27 -0
  59. sqlglot_mypy-1.19.1/mypy/build.py +3693 -0
  60. sqlglot_mypy-1.19.1/mypy/cache.py +509 -0
  61. sqlglot_mypy-1.19.1/mypy/checker.py +9445 -0
  62. sqlglot_mypy-1.19.1/mypy/checker_shared.py +354 -0
  63. sqlglot_mypy-1.19.1/mypy/checker_state.py +30 -0
  64. sqlglot_mypy-1.19.1/mypy/checkexpr.py +6895 -0
  65. sqlglot_mypy-1.19.1/mypy/checkmember.py +1576 -0
  66. sqlglot_mypy-1.19.1/mypy/checkpattern.py +829 -0
  67. sqlglot_mypy-1.19.1/mypy/checkstrformat.py +1099 -0
  68. sqlglot_mypy-1.19.1/mypy/config_parser.py +729 -0
  69. sqlglot_mypy-1.19.1/mypy/constant_fold.py +187 -0
  70. sqlglot_mypy-1.19.1/mypy/constraints.py +1713 -0
  71. sqlglot_mypy-1.19.1/mypy/copytype.py +135 -0
  72. sqlglot_mypy-1.19.1/mypy/defaults.py +44 -0
  73. sqlglot_mypy-1.19.1/mypy/dmypy/__init__.py +0 -0
  74. sqlglot_mypy-1.19.1/mypy/dmypy/__main__.py +6 -0
  75. sqlglot_mypy-1.19.1/mypy/dmypy/client.py +759 -0
  76. sqlglot_mypy-1.19.1/mypy/dmypy_os.py +42 -0
  77. sqlglot_mypy-1.19.1/mypy/dmypy_server.py +1126 -0
  78. sqlglot_mypy-1.19.1/mypy/dmypy_util.py +117 -0
  79. sqlglot_mypy-1.19.1/mypy/erasetype.py +287 -0
  80. sqlglot_mypy-1.19.1/mypy/error_formatter.py +37 -0
  81. sqlglot_mypy-1.19.1/mypy/errorcodes.py +332 -0
  82. sqlglot_mypy-1.19.1/mypy/errors.py +1411 -0
  83. sqlglot_mypy-1.19.1/mypy/evalexpr.py +208 -0
  84. sqlglot_mypy-1.19.1/mypy/expandtype.py +584 -0
  85. sqlglot_mypy-1.19.1/mypy/exportjson.py +578 -0
  86. sqlglot_mypy-1.19.1/mypy/exprtotype.py +289 -0
  87. sqlglot_mypy-1.19.1/mypy/fastparse.py +2279 -0
  88. sqlglot_mypy-1.19.1/mypy/find_sources.py +254 -0
  89. sqlglot_mypy-1.19.1/mypy/fixup.py +444 -0
  90. sqlglot_mypy-1.19.1/mypy/freetree.py +23 -0
  91. sqlglot_mypy-1.19.1/mypy/fscache.py +307 -0
  92. sqlglot_mypy-1.19.1/mypy/fswatcher.py +106 -0
  93. sqlglot_mypy-1.19.1/mypy/gclogger.py +48 -0
  94. sqlglot_mypy-1.19.1/mypy/git.py +34 -0
  95. sqlglot_mypy-1.19.1/mypy/graph_utils.py +117 -0
  96. sqlglot_mypy-1.19.1/mypy/indirection.py +163 -0
  97. sqlglot_mypy-1.19.1/mypy/infer.py +76 -0
  98. sqlglot_mypy-1.19.1/mypy/inspections.py +626 -0
  99. sqlglot_mypy-1.19.1/mypy/ipc.py +313 -0
  100. sqlglot_mypy-1.19.1/mypy/join.py +906 -0
  101. sqlglot_mypy-1.19.1/mypy/literals.py +324 -0
  102. sqlglot_mypy-1.19.1/mypy/lookup.py +65 -0
  103. sqlglot_mypy-1.19.1/mypy/main.py +1721 -0
  104. sqlglot_mypy-1.19.1/mypy/maptype.py +106 -0
  105. sqlglot_mypy-1.19.1/mypy/meet.py +1281 -0
  106. sqlglot_mypy-1.19.1/mypy/memprofile.py +122 -0
  107. sqlglot_mypy-1.19.1/mypy/message_registry.py +373 -0
  108. sqlglot_mypy-1.19.1/mypy/messages.py +3440 -0
  109. sqlglot_mypy-1.19.1/mypy/metastore.py +219 -0
  110. sqlglot_mypy-1.19.1/mypy/mixedtraverser.py +130 -0
  111. sqlglot_mypy-1.19.1/mypy/modulefinder.py +1003 -0
  112. sqlglot_mypy-1.19.1/mypy/moduleinspect.py +184 -0
  113. sqlglot_mypy-1.19.1/mypy/mro.py +62 -0
  114. sqlglot_mypy-1.19.1/mypy/nodes.py +5037 -0
  115. sqlglot_mypy-1.19.1/mypy/operators.py +126 -0
  116. sqlglot_mypy-1.19.1/mypy/options.py +631 -0
  117. sqlglot_mypy-1.19.1/mypy/parse.py +30 -0
  118. sqlglot_mypy-1.19.1/mypy/partially_defined.py +681 -0
  119. sqlglot_mypy-1.19.1/mypy/patterns.py +150 -0
  120. sqlglot_mypy-1.19.1/mypy/plugin.py +927 -0
  121. sqlglot_mypy-1.19.1/mypy/plugins/__init__.py +0 -0
  122. sqlglot_mypy-1.19.1/mypy/plugins/attrs.py +1183 -0
  123. sqlglot_mypy-1.19.1/mypy/plugins/common.py +439 -0
  124. sqlglot_mypy-1.19.1/mypy/plugins/constants.py +20 -0
  125. sqlglot_mypy-1.19.1/mypy/plugins/ctypes.py +245 -0
  126. sqlglot_mypy-1.19.1/mypy/plugins/dataclasses.py +1133 -0
  127. sqlglot_mypy-1.19.1/mypy/plugins/default.py +596 -0
  128. sqlglot_mypy-1.19.1/mypy/plugins/enums.py +299 -0
  129. sqlglot_mypy-1.19.1/mypy/plugins/functools.py +395 -0
  130. sqlglot_mypy-1.19.1/mypy/plugins/proper_plugin.py +178 -0
  131. sqlglot_mypy-1.19.1/mypy/plugins/singledispatch.py +214 -0
  132. sqlglot_mypy-1.19.1/mypy/py.typed +1 -0
  133. sqlglot_mypy-1.19.1/mypy/pyinfo.py +79 -0
  134. sqlglot_mypy-1.19.1/mypy/reachability.py +373 -0
  135. sqlglot_mypy-1.19.1/mypy/refinfo.py +92 -0
  136. sqlglot_mypy-1.19.1/mypy/renaming.py +583 -0
  137. sqlglot_mypy-1.19.1/mypy/report.py +926 -0
  138. sqlglot_mypy-1.19.1/mypy/scope.py +126 -0
  139. sqlglot_mypy-1.19.1/mypy/semanal.py +8277 -0
  140. sqlglot_mypy-1.19.1/mypy/semanal_classprop.py +188 -0
  141. sqlglot_mypy-1.19.1/mypy/semanal_enum.py +269 -0
  142. sqlglot_mypy-1.19.1/mypy/semanal_infer.py +131 -0
  143. sqlglot_mypy-1.19.1/mypy/semanal_main.py +572 -0
  144. sqlglot_mypy-1.19.1/mypy/semanal_namedtuple.py +726 -0
  145. sqlglot_mypy-1.19.1/mypy/semanal_newtype.py +273 -0
  146. sqlglot_mypy-1.19.1/mypy/semanal_pass1.py +159 -0
  147. sqlglot_mypy-1.19.1/mypy/semanal_shared.py +494 -0
  148. sqlglot_mypy-1.19.1/mypy/semanal_typeargs.py +292 -0
  149. sqlglot_mypy-1.19.1/mypy/semanal_typeddict.py +631 -0
  150. sqlglot_mypy-1.19.1/mypy/server/__init__.py +0 -0
  151. sqlglot_mypy-1.19.1/mypy/server/astdiff.py +550 -0
  152. sqlglot_mypy-1.19.1/mypy/server/astmerge.py +575 -0
  153. sqlglot_mypy-1.19.1/mypy/server/aststrip.py +281 -0
  154. sqlglot_mypy-1.19.1/mypy/server/deps.py +1136 -0
  155. sqlglot_mypy-1.19.1/mypy/server/mergecheck.py +84 -0
  156. sqlglot_mypy-1.19.1/mypy/server/objgraph.py +101 -0
  157. sqlglot_mypy-1.19.1/mypy/server/subexpr.py +203 -0
  158. sqlglot_mypy-1.19.1/mypy/server/target.py +11 -0
  159. sqlglot_mypy-1.19.1/mypy/server/trigger.py +26 -0
  160. sqlglot_mypy-1.19.1/mypy/server/update.py +1345 -0
  161. sqlglot_mypy-1.19.1/mypy/sharedparse.py +114 -0
  162. sqlglot_mypy-1.19.1/mypy/solve.py +598 -0
  163. sqlglot_mypy-1.19.1/mypy/split_namespace.py +35 -0
  164. sqlglot_mypy-1.19.1/mypy/state.py +29 -0
  165. sqlglot_mypy-1.19.1/mypy/stats.py +494 -0
  166. sqlglot_mypy-1.19.1/mypy/strconv.py +683 -0
  167. sqlglot_mypy-1.19.1/mypy/stubdoc.py +533 -0
  168. sqlglot_mypy-1.19.1/mypy/stubgen.py +2049 -0
  169. sqlglot_mypy-1.19.1/mypy/stubgenc.py +1046 -0
  170. sqlglot_mypy-1.19.1/mypy/stubinfo.py +318 -0
  171. sqlglot_mypy-1.19.1/mypy/stubtest.py +2464 -0
  172. sqlglot_mypy-1.19.1/mypy/stubutil.py +895 -0
  173. sqlglot_mypy-1.19.1/mypy/subtypes.py +2314 -0
  174. sqlglot_mypy-1.19.1/mypy/suggestions.py +1068 -0
  175. sqlglot_mypy-1.19.1/mypy/test/__init__.py +0 -0
  176. sqlglot_mypy-1.19.1/mypy/test/config.py +31 -0
  177. sqlglot_mypy-1.19.1/mypy/test/data.py +830 -0
  178. sqlglot_mypy-1.19.1/mypy/test/helpers.py +484 -0
  179. sqlglot_mypy-1.19.1/mypy/test/meta/__init__.py +0 -0
  180. sqlglot_mypy-1.19.1/mypy/test/meta/_pytest.py +72 -0
  181. sqlglot_mypy-1.19.1/mypy/test/meta/test_diff_helper.py +47 -0
  182. sqlglot_mypy-1.19.1/mypy/test/meta/test_parse_data.py +73 -0
  183. sqlglot_mypy-1.19.1/mypy/test/meta/test_update_data.py +135 -0
  184. sqlglot_mypy-1.19.1/mypy/test/test_config_parser.py +130 -0
  185. sqlglot_mypy-1.19.1/mypy/test/test_find_sources.py +376 -0
  186. sqlglot_mypy-1.19.1/mypy/test/test_ref_info.py +45 -0
  187. sqlglot_mypy-1.19.1/mypy/test/testapi.py +45 -0
  188. sqlglot_mypy-1.19.1/mypy/test/testargs.py +77 -0
  189. sqlglot_mypy-1.19.1/mypy/test/testcheck.py +311 -0
  190. sqlglot_mypy-1.19.1/mypy/test/testcmdline.py +150 -0
  191. sqlglot_mypy-1.19.1/mypy/test/testconstraints.py +134 -0
  192. sqlglot_mypy-1.19.1/mypy/test/testdaemon.py +132 -0
  193. sqlglot_mypy-1.19.1/mypy/test/testdeps.py +82 -0
  194. sqlglot_mypy-1.19.1/mypy/test/testdiff.py +70 -0
  195. sqlglot_mypy-1.19.1/mypy/test/testerrorstream.py +46 -0
  196. sqlglot_mypy-1.19.1/mypy/test/testexportjson.py +70 -0
  197. sqlglot_mypy-1.19.1/mypy/test/testfinegrained.py +441 -0
  198. sqlglot_mypy-1.19.1/mypy/test/testfinegrainedcache.py +18 -0
  199. sqlglot_mypy-1.19.1/mypy/test/testformatter.py +85 -0
  200. sqlglot_mypy-1.19.1/mypy/test/testfscache.py +100 -0
  201. sqlglot_mypy-1.19.1/mypy/test/testgraph.py +83 -0
  202. sqlglot_mypy-1.19.1/mypy/test/testinfer.py +373 -0
  203. sqlglot_mypy-1.19.1/mypy/test/testipc.py +119 -0
  204. sqlglot_mypy-1.19.1/mypy/test/testmerge.py +233 -0
  205. sqlglot_mypy-1.19.1/mypy/test/testmodulefinder.py +284 -0
  206. sqlglot_mypy-1.19.1/mypy/test/testmypyc.py +14 -0
  207. sqlglot_mypy-1.19.1/mypy/test/testoutput.py +58 -0
  208. sqlglot_mypy-1.19.1/mypy/test/testparse.py +118 -0
  209. sqlglot_mypy-1.19.1/mypy/test/testpep561.py +178 -0
  210. sqlglot_mypy-1.19.1/mypy/test/testpythoneval.py +116 -0
  211. sqlglot_mypy-1.19.1/mypy/test/testreports.py +55 -0
  212. sqlglot_mypy-1.19.1/mypy/test/testsemanal.py +207 -0
  213. sqlglot_mypy-1.19.1/mypy/test/testsolve.py +287 -0
  214. sqlglot_mypy-1.19.1/mypy/test/teststubgen.py +1648 -0
  215. sqlglot_mypy-1.19.1/mypy/test/teststubinfo.py +35 -0
  216. sqlglot_mypy-1.19.1/mypy/test/teststubtest.py +2965 -0
  217. sqlglot_mypy-1.19.1/mypy/test/testsubtypes.py +306 -0
  218. sqlglot_mypy-1.19.1/mypy/test/testtransform.py +63 -0
  219. sqlglot_mypy-1.19.1/mypy/test/testtypegen.py +82 -0
  220. sqlglot_mypy-1.19.1/mypy/test/testtypes.py +1611 -0
  221. sqlglot_mypy-1.19.1/mypy/test/testutil.py +111 -0
  222. sqlglot_mypy-1.19.1/mypy/test/typefixture.py +419 -0
  223. sqlglot_mypy-1.19.1/mypy/test/update_data.py +87 -0
  224. sqlglot_mypy-1.19.1/mypy/test/visitors.py +63 -0
  225. sqlglot_mypy-1.19.1/mypy/traverser.py +1086 -0
  226. sqlglot_mypy-1.19.1/mypy/treetransform.py +805 -0
  227. sqlglot_mypy-1.19.1/mypy/tvar_scope.py +167 -0
  228. sqlglot_mypy-1.19.1/mypy/type_visitor.py +612 -0
  229. sqlglot_mypy-1.19.1/mypy/typeanal.py +2731 -0
  230. sqlglot_mypy-1.19.1/mypy/typeops.py +1314 -0
  231. sqlglot_mypy-1.19.1/mypy/types.py +4438 -0
  232. sqlglot_mypy-1.19.1/mypy/types_utils.py +180 -0
  233. sqlglot_mypy-1.19.1/mypy/typeshed/LICENSE +237 -0
  234. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/VERSIONS +348 -0
  235. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/__future__.pyi +36 -0
  236. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/__main__.pyi +1 -0
  237. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_ast.pyi +145 -0
  238. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_asyncio.pyi +112 -0
  239. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_bisect.pyi +84 -0
  240. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_blake2.pyi +119 -0
  241. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_bootlocale.pyi +1 -0
  242. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_bz2.pyi +24 -0
  243. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_codecs.pyi +122 -0
  244. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_collections_abc.pyi +105 -0
  245. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_compat_pickle.pyi +10 -0
  246. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_compression.pyi +39 -0
  247. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_contextvars.pyi +64 -0
  248. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_csv.pyi +139 -0
  249. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_ctypes.pyi +337 -0
  250. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_curses.pyi +551 -0
  251. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_curses_panel.pyi +27 -0
  252. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_dbm.pyi +44 -0
  253. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_decimal.pyi +72 -0
  254. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_frozen_importlib.pyi +124 -0
  255. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_frozen_importlib_external.pyi +200 -0
  256. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_gdbm.pyi +48 -0
  257. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_hashlib.pyi +127 -0
  258. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_heapq.pyi +18 -0
  259. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_imp.pyi +30 -0
  260. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_interpchannels.pyi +86 -0
  261. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_interpqueues.pyi +19 -0
  262. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_interpreters.pyi +61 -0
  263. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_io.pyi +301 -0
  264. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_json.pyi +51 -0
  265. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_locale.pyi +121 -0
  266. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_lsprof.pyi +37 -0
  267. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_lzma.pyi +71 -0
  268. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_markupbase.pyi +16 -0
  269. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_msi.pyi +97 -0
  270. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_multibytecodec.pyi +49 -0
  271. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_operator.pyi +122 -0
  272. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_osx_support.pyi +34 -0
  273. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_pickle.pyi +107 -0
  274. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_posixsubprocess.pyi +59 -0
  275. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_py_abc.pyi +14 -0
  276. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_pydecimal.pyi +47 -0
  277. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_queue.pyi +18 -0
  278. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_random.pyi +18 -0
  279. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_sitebuiltins.pyi +17 -0
  280. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_socket.pyi +858 -0
  281. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_sqlite3.pyi +313 -0
  282. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_ssl.pyi +295 -0
  283. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_stat.pyi +119 -0
  284. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_struct.pyi +23 -0
  285. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_thread.pyi +117 -0
  286. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_threading_local.pyi +24 -0
  287. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_tkinter.pyi +144 -0
  288. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_tracemalloc.pyi +13 -0
  289. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_typeshed/__init__.pyi +393 -0
  290. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_typeshed/_type_checker_internals.pyi +89 -0
  291. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_typeshed/dbapi.pyi +37 -0
  292. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_typeshed/importlib.pyi +18 -0
  293. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_typeshed/wsgi.pyi +44 -0
  294. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_typeshed/xml.pyi +9 -0
  295. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_warnings.pyi +55 -0
  296. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_weakref.pyi +15 -0
  297. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_weakrefset.pyi +48 -0
  298. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_winapi.pyi +286 -0
  299. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/_zstd.pyi +97 -0
  300. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/abc.pyi +51 -0
  301. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/aifc.pyi +79 -0
  302. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/annotationlib.pyi +146 -0
  303. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/antigravity.pyi +3 -0
  304. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/argparse.pyi +829 -0
  305. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/array.pyi +106 -0
  306. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ast.pyi +2099 -0
  307. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asynchat.pyi +21 -0
  308. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/__init__.pyi +1005 -0
  309. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/base_events.pyi +488 -0
  310. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/base_futures.pyi +17 -0
  311. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/base_subprocess.pyi +63 -0
  312. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/base_tasks.pyi +9 -0
  313. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/constants.pyi +20 -0
  314. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/coroutines.pyi +28 -0
  315. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/events.pyi +675 -0
  316. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/exceptions.pyi +44 -0
  317. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/format_helpers.pyi +32 -0
  318. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/futures.pyi +19 -0
  319. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/graph.pyi +28 -0
  320. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/locks.pyi +104 -0
  321. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/log.pyi +3 -0
  322. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/mixins.pyi +9 -0
  323. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/proactor_events.pyi +65 -0
  324. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/protocols.pyi +41 -0
  325. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/queues.pyi +55 -0
  326. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/runners.pyi +33 -0
  327. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/selector_events.pyi +10 -0
  328. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/sslproto.pyi +165 -0
  329. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/staggered.pyi +10 -0
  330. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/streams.pyi +159 -0
  331. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/subprocess.pyi +230 -0
  332. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/taskgroups.pyi +26 -0
  333. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/tasks.pyi +475 -0
  334. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/threads.pyi +10 -0
  335. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/timeouts.pyi +20 -0
  336. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/tools.pyi +46 -0
  337. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/transports.pyi +57 -0
  338. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/trsock.pyi +129 -0
  339. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/unix_events.pyi +248 -0
  340. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/windows_events.pyi +121 -0
  341. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncio/windows_utils.pyi +49 -0
  342. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/asyncore.pyi +90 -0
  343. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/atexit.pyi +12 -0
  344. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/audioop.pyi +43 -0
  345. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/base64.pyi +61 -0
  346. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/bdb.pyi +130 -0
  347. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/binascii.pyi +40 -0
  348. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/binhex.pyi +45 -0
  349. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/bisect.pyi +4 -0
  350. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/builtins.pyi +2218 -0
  351. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/bz2.pyi +119 -0
  352. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/cProfile.pyi +31 -0
  353. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/calendar.pyi +208 -0
  354. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/cgi.pyi +119 -0
  355. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/cgitb.pyi +32 -0
  356. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/chunk.pyi +20 -0
  357. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/cmath.pyi +36 -0
  358. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/cmd.pyi +46 -0
  359. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/code.pyi +54 -0
  360. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/codecs.pyi +354 -0
  361. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/codeop.pyi +21 -0
  362. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/collections/__init__.pyi +511 -0
  363. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/collections/abc.pyi +2 -0
  364. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/colorsys.pyi +15 -0
  365. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compileall.pyi +88 -0
  366. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/__init__.pyi +0 -0
  367. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/_common/__init__.pyi +0 -0
  368. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/_common/_streams.pyi +37 -0
  369. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/bz2.pyi +1 -0
  370. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/gzip.pyi +1 -0
  371. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/lzma.pyi +1 -0
  372. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/zlib.pyi +1 -0
  373. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/zstd/__init__.pyi +88 -0
  374. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/compression/zstd/_zstdfile.pyi +117 -0
  375. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/__init__.pyi +0 -0
  376. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/futures/__init__.pyi +71 -0
  377. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/futures/_base.pyi +119 -0
  378. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/futures/interpreter.pyi +79 -0
  379. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/futures/process.pyi +242 -0
  380. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/futures/thread.pyi +140 -0
  381. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/interpreters/__init__.pyi +68 -0
  382. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/interpreters/_crossinterp.pyi +30 -0
  383. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/concurrent/interpreters/_queues.pyi +74 -0
  384. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/configparser.pyi +486 -0
  385. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/contextlib.pyi +225 -0
  386. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/contextvars.pyi +3 -0
  387. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/copy.pyi +28 -0
  388. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/copyreg.pyi +21 -0
  389. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/crypt.pyi +26 -0
  390. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/csv.pyi +155 -0
  391. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ctypes/__init__.pyi +332 -0
  392. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ctypes/_endian.pyi +16 -0
  393. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ctypes/macholib/__init__.pyi +3 -0
  394. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ctypes/macholib/dyld.pyi +8 -0
  395. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ctypes/macholib/dylib.pyi +14 -0
  396. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ctypes/macholib/framework.pyi +14 -0
  397. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ctypes/util.pyi +11 -0
  398. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ctypes/wintypes.pyi +321 -0
  399. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/curses/__init__.pyi +41 -0
  400. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/curses/ascii.pyi +62 -0
  401. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/curses/has_key.pyi +1 -0
  402. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/curses/panel.pyi +1 -0
  403. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/curses/textpad.pyi +11 -0
  404. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/dataclasses.pyi +490 -0
  405. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/datetime.pyi +346 -0
  406. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/dbm/__init__.pyi +105 -0
  407. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/dbm/dumb.pyi +37 -0
  408. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/dbm/gnu.pyi +1 -0
  409. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/dbm/ndbm.pyi +1 -0
  410. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/dbm/sqlite3.pyi +29 -0
  411. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/decimal.pyi +274 -0
  412. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/difflib.pyi +139 -0
  413. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/dis.pyi +295 -0
  414. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/__init__.pyi +5 -0
  415. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/_msvccompiler.pyi +13 -0
  416. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/archive_util.pyi +35 -0
  417. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/bcppcompiler.pyi +3 -0
  418. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/ccompiler.pyi +176 -0
  419. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/cmd.pyi +229 -0
  420. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/__init__.pyi +48 -0
  421. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/bdist.pyi +27 -0
  422. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/bdist_dumb.pyi +22 -0
  423. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/bdist_msi.pyi +45 -0
  424. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/bdist_packager.pyi +0 -0
  425. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/bdist_rpm.pyi +53 -0
  426. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/bdist_wininst.pyi +16 -0
  427. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/build.pyi +34 -0
  428. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/build_clib.pyi +29 -0
  429. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/build_ext.pyi +52 -0
  430. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/build_py.pyi +45 -0
  431. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/build_scripts.pyi +25 -0
  432. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/check.pyi +40 -0
  433. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/clean.pyi +18 -0
  434. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/config.pyi +84 -0
  435. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/install.pyi +71 -0
  436. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/install_data.pyi +20 -0
  437. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/install_egg_info.pyi +19 -0
  438. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/install_headers.pyi +17 -0
  439. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/install_lib.pyi +26 -0
  440. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/install_scripts.pyi +19 -0
  441. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/register.pyi +20 -0
  442. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/sdist.pyi +45 -0
  443. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/command/upload.pyi +18 -0
  444. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/config.pyi +17 -0
  445. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/core.pyi +58 -0
  446. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/cygwinccompiler.pyi +20 -0
  447. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/debug.pyi +3 -0
  448. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/dep_util.pyi +14 -0
  449. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/dir_util.pyi +23 -0
  450. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/dist.pyi +315 -0
  451. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/errors.pyi +19 -0
  452. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/extension.pyi +36 -0
  453. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/fancy_getopt.pyi +44 -0
  454. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/file_util.pyi +38 -0
  455. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/filelist.pyi +58 -0
  456. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/log.pyi +26 -0
  457. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/msvccompiler.pyi +3 -0
  458. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/spawn.pyi +10 -0
  459. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/sysconfig.pyi +33 -0
  460. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/text_file.pyi +21 -0
  461. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/unixccompiler.pyi +3 -0
  462. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/util.pyi +53 -0
  463. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/distutils/version.pyi +36 -0
  464. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/doctest.pyi +262 -0
  465. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/__init__.pyi +60 -0
  466. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/_header_value_parser.pyi +398 -0
  467. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/_policybase.pyi +80 -0
  468. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/base64mime.pyi +13 -0
  469. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/charset.pyi +42 -0
  470. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/contentmanager.pyi +11 -0
  471. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/encoders.pyi +8 -0
  472. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/errors.pyi +42 -0
  473. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/feedparser.pyi +22 -0
  474. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/generator.pyi +77 -0
  475. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/header.pyi +32 -0
  476. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/headerregistry.pyi +181 -0
  477. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/iterators.pyi +12 -0
  478. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/message.pyi +174 -0
  479. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/__init__.pyi +0 -0
  480. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/application.pyi +17 -0
  481. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/audio.pyi +17 -0
  482. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/base.pyi +8 -0
  483. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/image.pyi +17 -0
  484. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/message.pyi +8 -0
  485. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/multipart.pyi +18 -0
  486. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/nonmultipart.pyi +5 -0
  487. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/mime/text.pyi +9 -0
  488. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/parser.pyi +39 -0
  489. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/policy.pyi +75 -0
  490. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/quoprimime.pyi +28 -0
  491. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/email/utils.pyi +78 -0
  492. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/__init__.pyi +13 -0
  493. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/aliases.pyi +1 -0
  494. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/ascii.pyi +30 -0
  495. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/base64_codec.pyi +26 -0
  496. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/big5.pyi +23 -0
  497. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/big5hkscs.pyi +23 -0
  498. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/bz2_codec.pyi +26 -0
  499. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/charmap.pyi +33 -0
  500. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp037.pyi +21 -0
  501. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1006.pyi +21 -0
  502. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1026.pyi +21 -0
  503. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1125.pyi +21 -0
  504. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1140.pyi +21 -0
  505. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1250.pyi +21 -0
  506. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1251.pyi +21 -0
  507. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1252.pyi +21 -0
  508. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1253.pyi +21 -0
  509. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1254.pyi +21 -0
  510. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1255.pyi +21 -0
  511. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1256.pyi +21 -0
  512. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1257.pyi +21 -0
  513. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp1258.pyi +21 -0
  514. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp273.pyi +21 -0
  515. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp424.pyi +21 -0
  516. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp437.pyi +21 -0
  517. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp500.pyi +21 -0
  518. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp720.pyi +21 -0
  519. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp737.pyi +21 -0
  520. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp775.pyi +21 -0
  521. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp850.pyi +21 -0
  522. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp852.pyi +21 -0
  523. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp855.pyi +21 -0
  524. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp856.pyi +21 -0
  525. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp857.pyi +21 -0
  526. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp858.pyi +21 -0
  527. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp860.pyi +21 -0
  528. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp861.pyi +21 -0
  529. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp862.pyi +21 -0
  530. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp863.pyi +21 -0
  531. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp864.pyi +21 -0
  532. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp865.pyi +21 -0
  533. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp866.pyi +21 -0
  534. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp869.pyi +21 -0
  535. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp874.pyi +21 -0
  536. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp875.pyi +21 -0
  537. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp932.pyi +23 -0
  538. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp949.pyi +23 -0
  539. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/cp950.pyi +23 -0
  540. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/euc_jis_2004.pyi +23 -0
  541. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/euc_jisx0213.pyi +23 -0
  542. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/euc_jp.pyi +23 -0
  543. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/euc_kr.pyi +23 -0
  544. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/gb18030.pyi +23 -0
  545. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/gb2312.pyi +23 -0
  546. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/gbk.pyi +23 -0
  547. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/hex_codec.pyi +26 -0
  548. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/hp_roman8.pyi +21 -0
  549. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/hz.pyi +23 -0
  550. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/idna.pyi +26 -0
  551. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso2022_jp.pyi +23 -0
  552. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso2022_jp_1.pyi +23 -0
  553. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso2022_jp_2.pyi +23 -0
  554. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso2022_jp_2004.pyi +23 -0
  555. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso2022_jp_3.pyi +23 -0
  556. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso2022_jp_ext.pyi +23 -0
  557. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso2022_kr.pyi +23 -0
  558. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_1.pyi +21 -0
  559. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_10.pyi +21 -0
  560. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_11.pyi +21 -0
  561. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_13.pyi +21 -0
  562. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_14.pyi +21 -0
  563. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_15.pyi +21 -0
  564. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_16.pyi +21 -0
  565. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_2.pyi +21 -0
  566. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_3.pyi +21 -0
  567. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_4.pyi +21 -0
  568. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_5.pyi +21 -0
  569. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_6.pyi +21 -0
  570. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_7.pyi +21 -0
  571. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_8.pyi +21 -0
  572. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/iso8859_9.pyi +21 -0
  573. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/johab.pyi +23 -0
  574. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/koi8_r.pyi +21 -0
  575. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/koi8_t.pyi +21 -0
  576. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/koi8_u.pyi +21 -0
  577. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/kz1048.pyi +21 -0
  578. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/latin_1.pyi +30 -0
  579. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_arabic.pyi +21 -0
  580. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_croatian.pyi +21 -0
  581. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_cyrillic.pyi +21 -0
  582. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_farsi.pyi +21 -0
  583. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_greek.pyi +21 -0
  584. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_iceland.pyi +21 -0
  585. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_latin2.pyi +21 -0
  586. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_roman.pyi +21 -0
  587. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_romanian.pyi +21 -0
  588. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mac_turkish.pyi +21 -0
  589. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/mbcs.pyi +28 -0
  590. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/oem.pyi +28 -0
  591. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/palmos.pyi +21 -0
  592. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/ptcp154.pyi +21 -0
  593. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/punycode.pyi +33 -0
  594. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/quopri_codec.pyi +26 -0
  595. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/raw_unicode_escape.pyi +23 -0
  596. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/rot_13.pyi +23 -0
  597. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/shift_jis.pyi +23 -0
  598. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/shift_jis_2004.pyi +23 -0
  599. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/shift_jisx0213.pyi +23 -0
  600. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/tis_620.pyi +21 -0
  601. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/undefined.pyi +20 -0
  602. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/unicode_escape.pyi +23 -0
  603. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_16.pyi +20 -0
  604. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_16_be.pyi +26 -0
  605. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_16_le.pyi +26 -0
  606. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_32.pyi +20 -0
  607. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_32_be.pyi +26 -0
  608. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_32_le.pyi +26 -0
  609. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_7.pyi +26 -0
  610. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_8.pyi +26 -0
  611. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/utf_8_sig.pyi +22 -0
  612. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/uu_codec.pyi +28 -0
  613. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/encodings/zlib_codec.pyi +26 -0
  614. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ensurepip/__init__.pyi +12 -0
  615. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/enum.pyi +371 -0
  616. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/errno.pyi +227 -0
  617. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/faulthandler.pyi +23 -0
  618. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/fcntl.pyi +158 -0
  619. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/filecmp.pyi +65 -0
  620. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/fileinput.pyi +210 -0
  621. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/fnmatch.pyi +15 -0
  622. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/formatter.pyi +88 -0
  623. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/fractions.pyi +167 -0
  624. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ftplib.pyi +153 -0
  625. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/functools.pyi +258 -0
  626. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/gc.pyi +33 -0
  627. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/genericpath.pyi +64 -0
  628. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/getopt.pyi +27 -0
  629. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/getpass.pyi +14 -0
  630. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/gettext.pyi +189 -0
  631. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/glob.pyi +62 -0
  632. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/graphlib.pyi +28 -0
  633. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/grp.pyi +22 -0
  634. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/gzip.pyi +176 -0
  635. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/hashlib.pyi +89 -0
  636. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/heapq.pyi +17 -0
  637. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/hmac.pyi +34 -0
  638. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/html/__init__.pyi +6 -0
  639. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/html/entities.pyi +8 -0
  640. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/html/parser.pyi +40 -0
  641. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/http/__init__.pyi +118 -0
  642. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/http/client.pyi +266 -0
  643. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/http/cookiejar.pyi +159 -0
  644. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/http/cookies.pyi +56 -0
  645. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/http/server.pyi +142 -0
  646. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/imaplib.pyi +175 -0
  647. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/imghdr.pyi +18 -0
  648. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/imp.pyi +63 -0
  649. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/__init__.pyi +17 -0
  650. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/_abc.pyi +20 -0
  651. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/_bootstrap.pyi +2 -0
  652. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/_bootstrap_external.pyi +2 -0
  653. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/abc.pyi +187 -0
  654. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/machinery.pyi +43 -0
  655. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/metadata/__init__.pyi +320 -0
  656. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/metadata/_meta.pyi +63 -0
  657. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/metadata/diagnose.pyi +2 -0
  658. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/readers.pyi +72 -0
  659. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/resources/__init__.pyi +86 -0
  660. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/resources/_common.pyi +42 -0
  661. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/resources/_functional.pyi +31 -0
  662. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/resources/abc.pyi +55 -0
  663. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/resources/readers.pyi +14 -0
  664. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/resources/simple.pyi +56 -0
  665. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/simple.pyi +11 -0
  666. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/importlib/util.pyi +75 -0
  667. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/inspect.pyi +727 -0
  668. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/io.pyi +75 -0
  669. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ipaddress.pyi +247 -0
  670. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/itertools.pyi +351 -0
  671. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/json/__init__.pyi +61 -0
  672. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/json/decoder.pyi +32 -0
  673. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/json/encoder.pyi +40 -0
  674. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/json/scanner.pyi +7 -0
  675. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/json/tool.pyi +1 -0
  676. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/keyword.pyi +16 -0
  677. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/__init__.pyi +0 -0
  678. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/btm_matcher.pyi +28 -0
  679. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixer_base.pyi +42 -0
  680. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/__init__.pyi +0 -0
  681. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi +8 -0
  682. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi +10 -0
  683. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi +8 -0
  684. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi +8 -0
  685. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi +16 -0
  686. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_except.pyi +14 -0
  687. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi +8 -0
  688. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi +8 -0
  689. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi +13 -0
  690. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi +9 -0
  691. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi +8 -0
  692. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_future.pyi +8 -0
  693. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi +8 -0
  694. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi +8 -0
  695. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi +15 -0
  696. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_import.pyi +16 -0
  697. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi +21 -0
  698. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi +8 -0
  699. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_input.pyi +11 -0
  700. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi +9 -0
  701. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi +8 -0
  702. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi +9 -0
  703. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi +7 -0
  704. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_long.pyi +7 -0
  705. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_map.pyi +9 -0
  706. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi +17 -0
  707. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi +10 -0
  708. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi +8 -0
  709. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_next.pyi +19 -0
  710. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi +8 -0
  711. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi +8 -0
  712. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi +12 -0
  713. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi +8 -0
  714. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_print.pyi +12 -0
  715. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi +8 -0
  716. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi +8 -0
  717. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi +8 -0
  718. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi +9 -0
  719. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi +17 -0
  720. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi +8 -0
  721. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi +7 -0
  722. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi +8 -0
  723. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi +9 -0
  724. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi +8 -0
  725. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi +16 -0
  726. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_types.pyi +8 -0
  727. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi +12 -0
  728. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi +15 -0
  729. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi +12 -0
  730. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi +20 -0
  731. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi +8 -0
  732. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi +9 -0
  733. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/main.pyi +42 -0
  734. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pgen2/__init__.pyi +9 -0
  735. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pgen2/driver.pyi +27 -0
  736. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pgen2/grammar.pyi +24 -0
  737. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pgen2/literals.pyi +7 -0
  738. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pgen2/parse.pyi +30 -0
  739. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pgen2/pgen.pyi +51 -0
  740. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pgen2/token.pyi +69 -0
  741. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi +96 -0
  742. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pygram.pyi +114 -0
  743. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/pytree.pyi +118 -0
  744. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lib2to3/refactor.pyi +82 -0
  745. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/linecache.pyi +19 -0
  746. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/locale.pyi +166 -0
  747. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/logging/__init__.pyi +662 -0
  748. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/logging/config.pyi +150 -0
  749. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/logging/handlers.pyi +258 -0
  750. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/lzma.pyi +180 -0
  751. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/mailbox.pyi +262 -0
  752. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/mailcap.pyi +11 -0
  753. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/marshal.pyi +49 -0
  754. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/math.pyi +140 -0
  755. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/mimetypes.pyi +56 -0
  756. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/mmap.pyi +152 -0
  757. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/modulefinder.pyi +68 -0
  758. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/msilib/__init__.pyi +177 -0
  759. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/msilib/schema.pyi +95 -0
  760. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/msilib/sequence.pyi +14 -0
  761. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/msilib/text.pyi +8 -0
  762. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/msvcrt.pyi +32 -0
  763. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/__init__.pyi +90 -0
  764. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/connection.pyi +83 -0
  765. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/context.pyi +206 -0
  766. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/dummy/__init__.pyi +77 -0
  767. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/dummy/connection.pyi +39 -0
  768. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/forkserver.pyi +45 -0
  769. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/heap.pyi +37 -0
  770. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/managers.pyi +350 -0
  771. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/pool.pyi +101 -0
  772. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/popen_fork.pyi +26 -0
  773. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/popen_forkserver.pyi +16 -0
  774. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi +20 -0
  775. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi +30 -0
  776. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/process.pyi +39 -0
  777. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/queues.pyi +36 -0
  778. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/reduction.pyi +88 -0
  779. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/resource_sharer.pyi +20 -0
  780. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/resource_tracker.pyi +21 -0
  781. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/shared_memory.pyi +41 -0
  782. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/sharedctypes.pyi +129 -0
  783. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/spawn.pyi +32 -0
  784. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/synchronize.pyi +60 -0
  785. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/multiprocessing/util.pyi +108 -0
  786. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/netrc.pyi +23 -0
  787. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/nis.pyi +9 -0
  788. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/nntplib.pyi +120 -0
  789. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/nt.pyi +116 -0
  790. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ntpath.pyi +123 -0
  791. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/nturl2path.pyi +12 -0
  792. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/numbers.pyi +217 -0
  793. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/opcode.pyi +47 -0
  794. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/operator.pyi +217 -0
  795. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/optparse.pyi +308 -0
  796. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/os/__init__.pyi +1671 -0
  797. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/os/path.pyi +8 -0
  798. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ossaudiodev.pyi +132 -0
  799. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/parser.pyi +25 -0
  800. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pathlib/__init__.pyi +355 -0
  801. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pathlib/types.pyi +8 -0
  802. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pdb.pyi +259 -0
  803. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pickle.pyi +233 -0
  804. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pickletools.pyi +177 -0
  805. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pipes.pyi +16 -0
  806. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pkgutil.pyi +59 -0
  807. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/platform.pyi +112 -0
  808. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/plistlib.pyi +84 -0
  809. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/poplib.pyi +72 -0
  810. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/posix.pyi +405 -0
  811. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/posixpath.pyi +160 -0
  812. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pprint.pyi +159 -0
  813. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/profile.pyi +31 -0
  814. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pstats.pyi +91 -0
  815. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pty.pyi +28 -0
  816. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pwd.pyi +28 -0
  817. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/py_compile.pyi +34 -0
  818. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pyclbr.pyi +74 -0
  819. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pydoc.pyi +341 -0
  820. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pydoc_data/__init__.pyi +0 -0
  821. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pydoc_data/topics.pyi +3 -0
  822. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pyexpat/__init__.pyi +82 -0
  823. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pyexpat/errors.pyi +53 -0
  824. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/pyexpat/model.pyi +13 -0
  825. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/queue.pyi +55 -0
  826. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/quopri.pyi +12 -0
  827. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/random.pyi +133 -0
  828. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/re.pyi +314 -0
  829. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/readline.pyi +40 -0
  830. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/reprlib.pyi +65 -0
  831. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/resource.pyi +95 -0
  832. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/rlcompleter.pyi +9 -0
  833. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/runpy.pyi +24 -0
  834. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sched.pyi +46 -0
  835. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/secrets.pyi +15 -0
  836. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/select.pyi +167 -0
  837. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/selectors.pyi +69 -0
  838. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/shelve.pyi +59 -0
  839. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/shlex.pyi +63 -0
  840. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/shutil.pyi +236 -0
  841. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/signal.pyi +187 -0
  842. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/site.pyi +36 -0
  843. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/smtpd.pyi +92 -0
  844. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/smtplib.pyi +195 -0
  845. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sndhdr.pyi +14 -0
  846. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/socket.pyi +1433 -0
  847. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/socketserver.pyi +170 -0
  848. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/spwd.pyi +46 -0
  849. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sqlite3/__init__.pyi +478 -0
  850. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sqlite3/dbapi2.pyi +247 -0
  851. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sqlite3/dump.pyi +2 -0
  852. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sre_compile.pyi +11 -0
  853. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sre_constants.pyi +135 -0
  854. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sre_parse.pyi +104 -0
  855. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/ssl.pyi +540 -0
  856. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/stat.pyi +114 -0
  857. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/statistics.pyi +159 -0
  858. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/string/__init__.pyi +79 -0
  859. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/string/templatelib.pyi +36 -0
  860. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/stringprep.pyi +29 -0
  861. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/struct.pyi +5 -0
  862. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/subprocess.pyi +2093 -0
  863. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sunau.pyi +82 -0
  864. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/symbol.pyi +95 -0
  865. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/symtable.pyi +89 -0
  866. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sys/__init__.pyi +520 -0
  867. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sys/_monitoring.pyi +68 -0
  868. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/sysconfig.pyi +50 -0
  869. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/syslog.pyi +57 -0
  870. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tabnanny.pyi +16 -0
  871. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tarfile.pyi +839 -0
  872. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/telnetlib.pyi +123 -0
  873. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tempfile.pyi +479 -0
  874. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/termios.pyi +304 -0
  875. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/textwrap.pyi +103 -0
  876. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/this.pyi +2 -0
  877. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/threading.pyi +205 -0
  878. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/time.pyi +112 -0
  879. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/timeit.pyi +32 -0
  880. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/__init__.pyi +4173 -0
  881. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/colorchooser.pyi +12 -0
  882. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/commondialog.pyi +14 -0
  883. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/constants.pyi +80 -0
  884. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/dialog.pyi +13 -0
  885. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/dnd.pyi +19 -0
  886. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/filedialog.pyi +149 -0
  887. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/font.pyi +120 -0
  888. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/messagebox.pyi +98 -0
  889. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/scrolledtext.pyi +9 -0
  890. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/simpledialog.pyi +54 -0
  891. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/tix.pyi +299 -0
  892. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tkinter/ttk.pyi +1344 -0
  893. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/token.pyi +169 -0
  894. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tokenize.pyi +203 -0
  895. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tomllib.pyi +26 -0
  896. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/trace.pyi +86 -0
  897. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/traceback.pyi +331 -0
  898. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tracemalloc.pyi +122 -0
  899. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/tty.pyi +30 -0
  900. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/turtle.pyi +791 -0
  901. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/types.pyi +745 -0
  902. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/typing.pyi +1172 -0
  903. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/typing_extensions.pyi +709 -0
  904. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unicodedata.pyi +73 -0
  905. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/__init__.pyi +63 -0
  906. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/_log.pyi +27 -0
  907. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/async_case.pyi +25 -0
  908. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/case.pyi +322 -0
  909. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/loader.pyi +72 -0
  910. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/main.pyi +77 -0
  911. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/mock.pyi +576 -0
  912. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/result.pyi +47 -0
  913. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/runner.pyi +93 -0
  914. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/signals.pyi +15 -0
  915. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/suite.pyi +24 -0
  916. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/unittest/util.pyi +40 -0
  917. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/urllib/__init__.pyi +0 -0
  918. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/urllib/error.pyi +28 -0
  919. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/urllib/parse.pyi +201 -0
  920. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/urllib/request.pyi +417 -0
  921. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/urllib/response.pyi +40 -0
  922. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/urllib/robotparser.pyi +20 -0
  923. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/uu.pyi +13 -0
  924. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/uuid.pyi +106 -0
  925. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/venv/__init__.pyi +86 -0
  926. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/warnings.pyi +126 -0
  927. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/wave.pyi +90 -0
  928. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/weakref.pyi +198 -0
  929. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/webbrowser.pyi +84 -0
  930. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/winreg.pyi +132 -0
  931. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/winsound.pyi +38 -0
  932. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/wsgiref/__init__.pyi +0 -0
  933. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/wsgiref/handlers.pyi +91 -0
  934. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/wsgiref/headers.pyi +26 -0
  935. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/wsgiref/simple_server.pyi +37 -0
  936. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/wsgiref/types.pyi +32 -0
  937. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/wsgiref/util.pyi +26 -0
  938. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/wsgiref/validate.pyi +50 -0
  939. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xdrlib.pyi +57 -0
  940. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/__init__.pyi +3 -0
  941. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/dom/NodeFilter.pyi +22 -0
  942. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/dom/__init__.pyi +101 -0
  943. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/dom/domreg.pyi +8 -0
  944. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/dom/expatbuilder.pyi +126 -0
  945. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/dom/minicompat.pyi +24 -0
  946. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/dom/minidom.pyi +678 -0
  947. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/dom/pulldom.pyi +109 -0
  948. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/dom/xmlbuilder.pyi +81 -0
  949. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/etree/ElementInclude.pyi +27 -0
  950. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/etree/ElementPath.pyi +41 -0
  951. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/etree/ElementTree.pyi +366 -0
  952. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/etree/__init__.pyi +0 -0
  953. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/etree/cElementTree.pyi +1 -0
  954. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/parsers/__init__.pyi +1 -0
  955. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/parsers/expat/__init__.pyi +7 -0
  956. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/parsers/expat/errors.pyi +1 -0
  957. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/parsers/expat/model.pyi +1 -0
  958. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/sax/__init__.pyi +43 -0
  959. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/sax/_exceptions.pyi +19 -0
  960. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/sax/expatreader.pyi +78 -0
  961. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/sax/handler.pyi +86 -0
  962. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/sax/saxutils.pyi +68 -0
  963. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xml/sax/xmlreader.pyi +90 -0
  964. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xmlrpc/__init__.pyi +0 -0
  965. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xmlrpc/client.pyi +298 -0
  966. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xmlrpc/server.pyi +150 -0
  967. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/xxlimited.pyi +24 -0
  968. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zipapp.pyi +20 -0
  969. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zipfile/__init__.pyi +415 -0
  970. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zipfile/_path/__init__.pyi +83 -0
  971. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zipfile/_path/glob.pyi +26 -0
  972. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zipimport.pyi +59 -0
  973. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zlib.pyi +74 -0
  974. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zoneinfo/__init__.pyi +35 -0
  975. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zoneinfo/_common.pyi +14 -0
  976. sqlglot_mypy-1.19.1/mypy/typeshed/stdlib/zoneinfo/_tzpath.pyi +13 -0
  977. sqlglot_mypy-1.19.1/mypy/typeshed/stubs/librt/librt/__init__.pyi +0 -0
  978. sqlglot_mypy-1.19.1/mypy/typeshed/stubs/librt/librt/base64.pyi +2 -0
  979. sqlglot_mypy-1.19.1/mypy/typeshed/stubs/librt/librt/internal.pyi +21 -0
  980. sqlglot_mypy-1.19.1/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi +218 -0
  981. sqlglot_mypy-1.19.1/mypy/typestate.py +329 -0
  982. sqlglot_mypy-1.19.1/mypy/typetraverser.py +159 -0
  983. sqlglot_mypy-1.19.1/mypy/typevars.py +84 -0
  984. sqlglot_mypy-1.19.1/mypy/typevartuples.py +36 -0
  985. sqlglot_mypy-1.19.1/mypy/util.py +952 -0
  986. sqlglot_mypy-1.19.1/mypy/version.py +19 -0
  987. sqlglot_mypy-1.19.1/mypy/visitor.py +632 -0
  988. sqlglot_mypy-1.19.1/mypy/xml/mypy-html.css +104 -0
  989. sqlglot_mypy-1.19.1/mypy/xml/mypy-html.xslt +81 -0
  990. sqlglot_mypy-1.19.1/mypy/xml/mypy-txt.xslt +100 -0
  991. sqlglot_mypy-1.19.1/mypy/xml/mypy.xsd +50 -0
  992. sqlglot_mypy-1.19.1/mypy-requirements.txt +7 -0
  993. sqlglot_mypy-1.19.1/mypy_bootstrap.ini +9 -0
  994. sqlglot_mypy-1.19.1/mypy_self_check.ini +16 -0
  995. sqlglot_mypy-1.19.1/mypyc/README.md +12 -0
  996. sqlglot_mypy-1.19.1/mypyc/__init__.py +0 -0
  997. sqlglot_mypy-1.19.1/mypyc/__main__.py +72 -0
  998. sqlglot_mypy-1.19.1/mypyc/analysis/__init__.py +0 -0
  999. sqlglot_mypy-1.19.1/mypyc/analysis/attrdefined.py +437 -0
  1000. sqlglot_mypy-1.19.1/mypyc/analysis/blockfreq.py +32 -0
  1001. sqlglot_mypy-1.19.1/mypyc/analysis/capsule_deps.py +27 -0
  1002. sqlglot_mypy-1.19.1/mypyc/analysis/dataflow.py +635 -0
  1003. sqlglot_mypy-1.19.1/mypyc/analysis/ircheck.py +440 -0
  1004. sqlglot_mypy-1.19.1/mypyc/analysis/selfleaks.py +219 -0
  1005. sqlglot_mypy-1.19.1/mypyc/annotate.py +472 -0
  1006. sqlglot_mypy-1.19.1/mypyc/build.py +756 -0
  1007. sqlglot_mypy-1.19.1/mypyc/build_setup.py +62 -0
  1008. sqlglot_mypy-1.19.1/mypyc/codegen/__init__.py +0 -0
  1009. sqlglot_mypy-1.19.1/mypyc/codegen/cstring.py +54 -0
  1010. sqlglot_mypy-1.19.1/mypyc/codegen/emit.py +1240 -0
  1011. sqlglot_mypy-1.19.1/mypyc/codegen/emitclass.py +1256 -0
  1012. sqlglot_mypy-1.19.1/mypyc/codegen/emitfunc.py +994 -0
  1013. sqlglot_mypy-1.19.1/mypyc/codegen/emitmodule.py +1314 -0
  1014. sqlglot_mypy-1.19.1/mypyc/codegen/emitwrapper.py +979 -0
  1015. sqlglot_mypy-1.19.1/mypyc/codegen/literals.py +302 -0
  1016. sqlglot_mypy-1.19.1/mypyc/common.py +140 -0
  1017. sqlglot_mypy-1.19.1/mypyc/crash.py +32 -0
  1018. sqlglot_mypy-1.19.1/mypyc/doc/Makefile +20 -0
  1019. sqlglot_mypy-1.19.1/mypyc/doc/bool_operations.rst +27 -0
  1020. sqlglot_mypy-1.19.1/mypyc/doc/bytes_operations.rst +46 -0
  1021. sqlglot_mypy-1.19.1/mypyc/doc/compilation_units.rst +20 -0
  1022. sqlglot_mypy-1.19.1/mypyc/doc/conf.py +59 -0
  1023. sqlglot_mypy-1.19.1/mypyc/doc/cpython-timings.md +25 -0
  1024. sqlglot_mypy-1.19.1/mypyc/doc/dev-intro.md +641 -0
  1025. sqlglot_mypy-1.19.1/mypyc/doc/dict_operations.rst +61 -0
  1026. sqlglot_mypy-1.19.1/mypyc/doc/differences_from_python.rst +334 -0
  1027. sqlglot_mypy-1.19.1/mypyc/doc/float_operations.rst +50 -0
  1028. sqlglot_mypy-1.19.1/mypyc/doc/frozenset_operations.rst +29 -0
  1029. sqlglot_mypy-1.19.1/mypyc/doc/future.md +42 -0
  1030. sqlglot_mypy-1.19.1/mypyc/doc/getting_started.rst +240 -0
  1031. sqlglot_mypy-1.19.1/mypyc/doc/index.rst +63 -0
  1032. sqlglot_mypy-1.19.1/mypyc/doc/int_operations.rst +162 -0
  1033. sqlglot_mypy-1.19.1/mypyc/doc/introduction.rst +150 -0
  1034. sqlglot_mypy-1.19.1/mypyc/doc/list_operations.rst +66 -0
  1035. sqlglot_mypy-1.19.1/mypyc/doc/make.bat +35 -0
  1036. sqlglot_mypy-1.19.1/mypyc/doc/native_classes.rst +272 -0
  1037. sqlglot_mypy-1.19.1/mypyc/doc/native_operations.rst +56 -0
  1038. sqlglot_mypy-1.19.1/mypyc/doc/performance_tips_and_tricks.rst +243 -0
  1039. sqlglot_mypy-1.19.1/mypyc/doc/set_operations.rst +47 -0
  1040. sqlglot_mypy-1.19.1/mypyc/doc/str_operations.rst +90 -0
  1041. sqlglot_mypy-1.19.1/mypyc/doc/tuple_operations.rst +35 -0
  1042. sqlglot_mypy-1.19.1/mypyc/doc/using_type_annotations.rst +398 -0
  1043. sqlglot_mypy-1.19.1/mypyc/errors.py +29 -0
  1044. sqlglot_mypy-1.19.1/mypyc/external/googletest/LICENSE +28 -0
  1045. sqlglot_mypy-1.19.1/mypyc/external/googletest/README.md +280 -0
  1046. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest-death-test.h +294 -0
  1047. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest-message.h +250 -0
  1048. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest-param-test.h +1444 -0
  1049. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest-param-test.h.pump +510 -0
  1050. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest-printers.h +993 -0
  1051. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest-spi.h +232 -0
  1052. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest-test-part.h +179 -0
  1053. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest-typed-test.h +263 -0
  1054. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest.h +2236 -0
  1055. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest_pred_impl.h +358 -0
  1056. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/gtest_prod.h +58 -0
  1057. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/custom/gtest-port.h +69 -0
  1058. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
  1059. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/custom/gtest.h +41 -0
  1060. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-death-test-internal.h +319 -0
  1061. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-filepath.h +206 -0
  1062. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-internal.h +1238 -0
  1063. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-linked_ptr.h +243 -0
  1064. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-param-util-generated.h +5146 -0
  1065. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +286 -0
  1066. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-param-util.h +731 -0
  1067. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-port-arch.h +93 -0
  1068. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-port.h +2560 -0
  1069. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-string.h +167 -0
  1070. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-tuple.h +1020 -0
  1071. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-tuple.h.pump +347 -0
  1072. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-type-util.h +3331 -0
  1073. sqlglot_mypy-1.19.1/mypyc/external/googletest/include/gtest/internal/gtest-type-util.h.pump +297 -0
  1074. sqlglot_mypy-1.19.1/mypyc/external/googletest/make/Makefile +61 -0
  1075. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest-all.cc +48 -0
  1076. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest-death-test.cc +1342 -0
  1077. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest-filepath.cc +387 -0
  1078. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest-internal-inl.h +1183 -0
  1079. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest-port.cc +1259 -0
  1080. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest-printers.cc +373 -0
  1081. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest-test-part.cc +110 -0
  1082. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest-typed-test.cc +118 -0
  1083. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest.cc +5388 -0
  1084. sqlglot_mypy-1.19.1/mypyc/external/googletest/src/gtest_main.cc +38 -0
  1085. sqlglot_mypy-1.19.1/mypyc/ir/__init__.py +0 -0
  1086. sqlglot_mypy-1.19.1/mypyc/ir/class_ir.py +538 -0
  1087. sqlglot_mypy-1.19.1/mypyc/ir/func_ir.py +484 -0
  1088. sqlglot_mypy-1.19.1/mypyc/ir/module_ir.py +97 -0
  1089. sqlglot_mypy-1.19.1/mypyc/ir/ops.py +2039 -0
  1090. sqlglot_mypy-1.19.1/mypyc/ir/pprint.py +523 -0
  1091. sqlglot_mypy-1.19.1/mypyc/ir/rtypes.py +1148 -0
  1092. sqlglot_mypy-1.19.1/mypyc/irbuild/__init__.py +0 -0
  1093. sqlglot_mypy-1.19.1/mypyc/irbuild/ast_helpers.py +123 -0
  1094. sqlglot_mypy-1.19.1/mypyc/irbuild/builder.py +1594 -0
  1095. sqlglot_mypy-1.19.1/mypyc/irbuild/callable_class.py +174 -0
  1096. sqlglot_mypy-1.19.1/mypyc/irbuild/classdef.py +927 -0
  1097. sqlglot_mypy-1.19.1/mypyc/irbuild/constant_fold.py +97 -0
  1098. sqlglot_mypy-1.19.1/mypyc/irbuild/context.py +200 -0
  1099. sqlglot_mypy-1.19.1/mypyc/irbuild/env_class.py +282 -0
  1100. sqlglot_mypy-1.19.1/mypyc/irbuild/expression.py +1122 -0
  1101. sqlglot_mypy-1.19.1/mypyc/irbuild/for_helpers.py +1268 -0
  1102. sqlglot_mypy-1.19.1/mypyc/irbuild/format_str_tokenizer.py +252 -0
  1103. sqlglot_mypy-1.19.1/mypyc/irbuild/function.py +1183 -0
  1104. sqlglot_mypy-1.19.1/mypyc/irbuild/generator.py +437 -0
  1105. sqlglot_mypy-1.19.1/mypyc/irbuild/ll_builder.py +2778 -0
  1106. sqlglot_mypy-1.19.1/mypyc/irbuild/main.py +172 -0
  1107. sqlglot_mypy-1.19.1/mypyc/irbuild/mapper.py +238 -0
  1108. sqlglot_mypy-1.19.1/mypyc/irbuild/match.py +362 -0
  1109. sqlglot_mypy-1.19.1/mypyc/irbuild/missingtypevisitor.py +20 -0
  1110. sqlglot_mypy-1.19.1/mypyc/irbuild/nonlocalcontrol.py +216 -0
  1111. sqlglot_mypy-1.19.1/mypyc/irbuild/prebuildvisitor.py +216 -0
  1112. sqlglot_mypy-1.19.1/mypyc/irbuild/prepare.py +897 -0
  1113. sqlglot_mypy-1.19.1/mypyc/irbuild/specialize.py +1142 -0
  1114. sqlglot_mypy-1.19.1/mypyc/irbuild/statement.py +1279 -0
  1115. sqlglot_mypy-1.19.1/mypyc/irbuild/targets.py +70 -0
  1116. sqlglot_mypy-1.19.1/mypyc/irbuild/util.py +305 -0
  1117. sqlglot_mypy-1.19.1/mypyc/irbuild/visitor.py +410 -0
  1118. sqlglot_mypy-1.19.1/mypyc/irbuild/vtable.py +82 -0
  1119. sqlglot_mypy-1.19.1/mypyc/lib-rt/CPy.h +981 -0
  1120. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx/codec.c +68 -0
  1121. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx/enc_loop_asm.c +264 -0
  1122. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx2/codec.c +58 -0
  1123. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx2/dec_loop.c +110 -0
  1124. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx2/dec_reshuffle.c +34 -0
  1125. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx2/enc_loop.c +89 -0
  1126. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx2/enc_loop_asm.c +291 -0
  1127. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx2/enc_reshuffle.c +83 -0
  1128. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx2/enc_translate.c +30 -0
  1129. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx512/codec.c +44 -0
  1130. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx512/enc_loop.c +61 -0
  1131. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/avx512/enc_reshuffle_translate.c +50 -0
  1132. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/generic/32/dec_loop.c +86 -0
  1133. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/generic/32/enc_loop.c +73 -0
  1134. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/generic/64/enc_loop.c +77 -0
  1135. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/generic/codec.c +41 -0
  1136. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/generic/dec_head.c +37 -0
  1137. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/generic/dec_tail.c +91 -0
  1138. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/generic/enc_head.c +24 -0
  1139. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/generic/enc_tail.c +34 -0
  1140. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon32/codec.c +79 -0
  1141. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon32/dec_loop.c +106 -0
  1142. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon32/enc_loop.c +170 -0
  1143. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon32/enc_reshuffle.c +31 -0
  1144. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon32/enc_translate.c +57 -0
  1145. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon64/codec.c +93 -0
  1146. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon64/dec_loop.c +129 -0
  1147. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon64/enc_loop.c +66 -0
  1148. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon64/enc_loop_asm.c +168 -0
  1149. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/neon64/enc_reshuffle.c +31 -0
  1150. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/sse41/codec.c +58 -0
  1151. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/sse42/codec.c +58 -0
  1152. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/ssse3/codec.c +60 -0
  1153. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/ssse3/dec_loop.c +173 -0
  1154. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/ssse3/dec_reshuffle.c +33 -0
  1155. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/ssse3/enc_loop.c +67 -0
  1156. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/ssse3/enc_loop_asm.c +268 -0
  1157. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/ssse3/enc_reshuffle.c +48 -0
  1158. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/arch/ssse3/enc_translate.c +33 -0
  1159. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/codec_choose.c +314 -0
  1160. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/codecs.h +57 -0
  1161. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/config.h +24 -0
  1162. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/env.h +84 -0
  1163. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/lib.c +164 -0
  1164. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/libbase64.h +146 -0
  1165. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/tables/table_dec_32bit.h +393 -0
  1166. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/tables/table_enc_12bit.h +1031 -0
  1167. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/tables/tables.c +40 -0
  1168. sqlglot_mypy-1.19.1/mypyc/lib-rt/base64/tables/tables.h +23 -0
  1169. sqlglot_mypy-1.19.1/mypyc/lib-rt/bytes_ops.c +164 -0
  1170. sqlglot_mypy-1.19.1/mypyc/lib-rt/dict_ops.c +491 -0
  1171. sqlglot_mypy-1.19.1/mypyc/lib-rt/exc_ops.c +261 -0
  1172. sqlglot_mypy-1.19.1/mypyc/lib-rt/float_ops.c +239 -0
  1173. sqlglot_mypy-1.19.1/mypyc/lib-rt/generic_ops.c +84 -0
  1174. sqlglot_mypy-1.19.1/mypyc/lib-rt/getargs.c +451 -0
  1175. sqlglot_mypy-1.19.1/mypyc/lib-rt/getargsfast.c +569 -0
  1176. sqlglot_mypy-1.19.1/mypyc/lib-rt/init.c +24 -0
  1177. sqlglot_mypy-1.19.1/mypyc/lib-rt/int_ops.c +647 -0
  1178. sqlglot_mypy-1.19.1/mypyc/lib-rt/librt_base64.c +311 -0
  1179. sqlglot_mypy-1.19.1/mypyc/lib-rt/librt_base64.h +60 -0
  1180. sqlglot_mypy-1.19.1/mypyc/lib-rt/librt_internal.c +1037 -0
  1181. sqlglot_mypy-1.19.1/mypyc/lib-rt/librt_internal.h +111 -0
  1182. sqlglot_mypy-1.19.1/mypyc/lib-rt/list_ops.c +406 -0
  1183. sqlglot_mypy-1.19.1/mypyc/lib-rt/misc_ops.c +1149 -0
  1184. sqlglot_mypy-1.19.1/mypyc/lib-rt/module_shim.tmpl +21 -0
  1185. sqlglot_mypy-1.19.1/mypyc/lib-rt/module_shim_no_gil_multiphase.tmpl +41 -0
  1186. sqlglot_mypy-1.19.1/mypyc/lib-rt/mypyc_util.h +182 -0
  1187. sqlglot_mypy-1.19.1/mypyc/lib-rt/pythoncapi_compat.h +2594 -0
  1188. sqlglot_mypy-1.19.1/mypyc/lib-rt/pythonsupport.c +106 -0
  1189. sqlglot_mypy-1.19.1/mypyc/lib-rt/pythonsupport.h +478 -0
  1190. sqlglot_mypy-1.19.1/mypyc/lib-rt/set_ops.c +17 -0
  1191. sqlglot_mypy-1.19.1/mypyc/lib-rt/setup.py +170 -0
  1192. sqlglot_mypy-1.19.1/mypyc/lib-rt/str_ops.c +799 -0
  1193. sqlglot_mypy-1.19.1/mypyc/lib-rt/test_capi.cc +585 -0
  1194. sqlglot_mypy-1.19.1/mypyc/lib-rt/tuple_ops.c +62 -0
  1195. sqlglot_mypy-1.19.1/mypyc/lower/__init__.py +0 -0
  1196. sqlglot_mypy-1.19.1/mypyc/lower/int_ops.py +113 -0
  1197. sqlglot_mypy-1.19.1/mypyc/lower/list_ops.py +71 -0
  1198. sqlglot_mypy-1.19.1/mypyc/lower/misc_ops.py +18 -0
  1199. sqlglot_mypy-1.19.1/mypyc/lower/registry.py +28 -0
  1200. sqlglot_mypy-1.19.1/mypyc/namegen.py +124 -0
  1201. sqlglot_mypy-1.19.1/mypyc/options.py +62 -0
  1202. sqlglot_mypy-1.19.1/mypyc/primitives/__init__.py +0 -0
  1203. sqlglot_mypy-1.19.1/mypyc/primitives/bytes_ops.py +128 -0
  1204. sqlglot_mypy-1.19.1/mypyc/primitives/dict_ops.py +343 -0
  1205. sqlglot_mypy-1.19.1/mypyc/primitives/exc_ops.py +111 -0
  1206. sqlglot_mypy-1.19.1/mypyc/primitives/float_ops.py +178 -0
  1207. sqlglot_mypy-1.19.1/mypyc/primitives/generic_ops.py +426 -0
  1208. sqlglot_mypy-1.19.1/mypyc/primitives/int_ops.py +323 -0
  1209. sqlglot_mypy-1.19.1/mypyc/primitives/list_ops.py +374 -0
  1210. sqlglot_mypy-1.19.1/mypyc/primitives/misc_ops.py +486 -0
  1211. sqlglot_mypy-1.19.1/mypyc/primitives/registry.py +396 -0
  1212. sqlglot_mypy-1.19.1/mypyc/primitives/set_ops.py +161 -0
  1213. sqlglot_mypy-1.19.1/mypyc/primitives/str_ops.py +533 -0
  1214. sqlglot_mypy-1.19.1/mypyc/primitives/tuple_ops.py +136 -0
  1215. sqlglot_mypy-1.19.1/mypyc/primitives/weakref_ops.py +40 -0
  1216. sqlglot_mypy-1.19.1/mypyc/py.typed +0 -0
  1217. sqlglot_mypy-1.19.1/mypyc/rt_subtype.py +77 -0
  1218. sqlglot_mypy-1.19.1/mypyc/sametype.py +83 -0
  1219. sqlglot_mypy-1.19.1/mypyc/subtype.py +88 -0
  1220. sqlglot_mypy-1.19.1/mypyc/test/__init__.py +0 -0
  1221. sqlglot_mypy-1.19.1/mypyc/test/config.py +13 -0
  1222. sqlglot_mypy-1.19.1/mypyc/test/test_alwaysdefined.py +46 -0
  1223. sqlglot_mypy-1.19.1/mypyc/test/test_analysis.py +77 -0
  1224. sqlglot_mypy-1.19.1/mypyc/test/test_annotate.py +71 -0
  1225. sqlglot_mypy-1.19.1/mypyc/test/test_cheader.py +43 -0
  1226. sqlglot_mypy-1.19.1/mypyc/test/test_commandline.py +82 -0
  1227. sqlglot_mypy-1.19.1/mypyc/test/test_emit.py +170 -0
  1228. sqlglot_mypy-1.19.1/mypyc/test/test_emitclass.py +35 -0
  1229. sqlglot_mypy-1.19.1/mypyc/test/test_emitfunc.py +1010 -0
  1230. sqlglot_mypy-1.19.1/mypyc/test/test_emitwrapper.py +60 -0
  1231. sqlglot_mypy-1.19.1/mypyc/test/test_exceptions.py +56 -0
  1232. sqlglot_mypy-1.19.1/mypyc/test/test_external.py +52 -0
  1233. sqlglot_mypy-1.19.1/mypyc/test/test_irbuild.py +93 -0
  1234. sqlglot_mypy-1.19.1/mypyc/test/test_ircheck.py +199 -0
  1235. sqlglot_mypy-1.19.1/mypyc/test/test_literals.py +90 -0
  1236. sqlglot_mypy-1.19.1/mypyc/test/test_lowering.py +61 -0
  1237. sqlglot_mypy-1.19.1/mypyc/test/test_misc.py +20 -0
  1238. sqlglot_mypy-1.19.1/mypyc/test/test_namegen.py +68 -0
  1239. sqlglot_mypy-1.19.1/mypyc/test/test_optimizations.py +68 -0
  1240. sqlglot_mypy-1.19.1/mypyc/test/test_pprint.py +42 -0
  1241. sqlglot_mypy-1.19.1/mypyc/test/test_rarray.py +48 -0
  1242. sqlglot_mypy-1.19.1/mypyc/test/test_refcount.py +59 -0
  1243. sqlglot_mypy-1.19.1/mypyc/test/test_run.py +499 -0
  1244. sqlglot_mypy-1.19.1/mypyc/test/test_serialization.py +108 -0
  1245. sqlglot_mypy-1.19.1/mypyc/test/test_struct.py +112 -0
  1246. sqlglot_mypy-1.19.1/mypyc/test/test_tuplename.py +33 -0
  1247. sqlglot_mypy-1.19.1/mypyc/test/test_typeops.py +97 -0
  1248. sqlglot_mypy-1.19.1/mypyc/test/testutil.py +286 -0
  1249. sqlglot_mypy-1.19.1/mypyc/test-data/alwaysdefined.test +731 -0
  1250. sqlglot_mypy-1.19.1/mypyc/test-data/analysis.test +470 -0
  1251. sqlglot_mypy-1.19.1/mypyc/test-data/annotate-basic.test +477 -0
  1252. sqlglot_mypy-1.19.1/mypyc/test-data/commandline.test +314 -0
  1253. sqlglot_mypy-1.19.1/mypyc/test-data/driver/driver.py +59 -0
  1254. sqlglot_mypy-1.19.1/mypyc/test-data/exceptions-freq.test +125 -0
  1255. sqlglot_mypy-1.19.1/mypyc/test-data/exceptions.test +721 -0
  1256. sqlglot_mypy-1.19.1/mypyc/test-data/fixtures/ir.py +420 -0
  1257. sqlglot_mypy-1.19.1/mypyc/test-data/fixtures/testutil.py +103 -0
  1258. sqlglot_mypy-1.19.1/mypyc/test-data/fixtures/typing-full.pyi +178 -0
  1259. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-any.test +229 -0
  1260. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-base64.test +37 -0
  1261. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-basic.test +3801 -0
  1262. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-bool.test +653 -0
  1263. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-bytes.test +219 -0
  1264. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-classes.test +2902 -0
  1265. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-constant-fold.test +480 -0
  1266. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-dict.test +567 -0
  1267. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-dunders.test +215 -0
  1268. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-float.test +497 -0
  1269. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-frozenset.test +115 -0
  1270. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-generics.test +775 -0
  1271. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-glue-methods.test +455 -0
  1272. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-i16.test +526 -0
  1273. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-i32.test +598 -0
  1274. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-i64.test +2146 -0
  1275. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-int.test +222 -0
  1276. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-isinstance.test +219 -0
  1277. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-lists.test +974 -0
  1278. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-match.test +1806 -0
  1279. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-math.test +64 -0
  1280. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-nested.test +841 -0
  1281. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-optional.test +530 -0
  1282. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-set.test +801 -0
  1283. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-singledispatch.test +331 -0
  1284. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-statements.test +1054 -0
  1285. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-str.test +847 -0
  1286. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-strip-asserts.test +12 -0
  1287. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-try.test +607 -0
  1288. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-tuple.test +1011 -0
  1289. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-u8.test +543 -0
  1290. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-unreachable.test +210 -0
  1291. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-vectorcall.test +121 -0
  1292. sqlglot_mypy-1.19.1/mypyc/test-data/irbuild-weakref.test +103 -0
  1293. sqlglot_mypy-1.19.1/mypyc/test-data/lowering-int.test +382 -0
  1294. sqlglot_mypy-1.19.1/mypyc/test-data/lowering-list.test +33 -0
  1295. sqlglot_mypy-1.19.1/mypyc/test-data/opt-copy-propagation.test +400 -0
  1296. sqlglot_mypy-1.19.1/mypyc/test-data/opt-flag-elimination.test +296 -0
  1297. sqlglot_mypy-1.19.1/mypyc/test-data/refcount.test +1501 -0
  1298. sqlglot_mypy-1.19.1/mypyc/test-data/run-async.test +1401 -0
  1299. sqlglot_mypy-1.19.1/mypyc/test-data/run-attrs.test +318 -0
  1300. sqlglot_mypy-1.19.1/mypyc/test-data/run-base64.test +167 -0
  1301. sqlglot_mypy-1.19.1/mypyc/test-data/run-bench.test +196 -0
  1302. sqlglot_mypy-1.19.1/mypyc/test-data/run-bools.test +368 -0
  1303. sqlglot_mypy-1.19.1/mypyc/test-data/run-bytes.test +403 -0
  1304. sqlglot_mypy-1.19.1/mypyc/test-data/run-classes.test +5740 -0
  1305. sqlglot_mypy-1.19.1/mypyc/test-data/run-dicts.test +370 -0
  1306. sqlglot_mypy-1.19.1/mypyc/test-data/run-dunders-special.test +12 -0
  1307. sqlglot_mypy-1.19.1/mypyc/test-data/run-dunders.test +1011 -0
  1308. sqlglot_mypy-1.19.1/mypyc/test-data/run-exceptions.test +534 -0
  1309. sqlglot_mypy-1.19.1/mypyc/test-data/run-floats.test +545 -0
  1310. sqlglot_mypy-1.19.1/mypyc/test-data/run-functions.test +1340 -0
  1311. sqlglot_mypy-1.19.1/mypyc/test-data/run-generators.test +946 -0
  1312. sqlglot_mypy-1.19.1/mypyc/test-data/run-generics.test +113 -0
  1313. sqlglot_mypy-1.19.1/mypyc/test-data/run-i16.test +338 -0
  1314. sqlglot_mypy-1.19.1/mypyc/test-data/run-i32.test +336 -0
  1315. sqlglot_mypy-1.19.1/mypyc/test-data/run-i64.test +1516 -0
  1316. sqlglot_mypy-1.19.1/mypyc/test-data/run-imports.test +269 -0
  1317. sqlglot_mypy-1.19.1/mypyc/test-data/run-integers.test +588 -0
  1318. sqlglot_mypy-1.19.1/mypyc/test-data/run-lists.test +595 -0
  1319. sqlglot_mypy-1.19.1/mypyc/test-data/run-loops.test +578 -0
  1320. sqlglot_mypy-1.19.1/mypyc/test-data/run-match.test +283 -0
  1321. sqlglot_mypy-1.19.1/mypyc/test-data/run-math.test +105 -0
  1322. sqlglot_mypy-1.19.1/mypyc/test-data/run-misc.test +1198 -0
  1323. sqlglot_mypy-1.19.1/mypyc/test-data/run-multimodule.test +952 -0
  1324. sqlglot_mypy-1.19.1/mypyc/test-data/run-mypy-sim.test +138 -0
  1325. sqlglot_mypy-1.19.1/mypyc/test-data/run-primitives.test +375 -0
  1326. sqlglot_mypy-1.19.1/mypyc/test-data/run-python312.test +231 -0
  1327. sqlglot_mypy-1.19.1/mypyc/test-data/run-python37.test +159 -0
  1328. sqlglot_mypy-1.19.1/mypyc/test-data/run-python38.test +89 -0
  1329. sqlglot_mypy-1.19.1/mypyc/test-data/run-sets.test +319 -0
  1330. sqlglot_mypy-1.19.1/mypyc/test-data/run-signatures.test +223 -0
  1331. sqlglot_mypy-1.19.1/mypyc/test-data/run-singledispatch.test +726 -0
  1332. sqlglot_mypy-1.19.1/mypyc/test-data/run-strings.test +1234 -0
  1333. sqlglot_mypy-1.19.1/mypyc/test-data/run-traits.test +411 -0
  1334. sqlglot_mypy-1.19.1/mypyc/test-data/run-tuples.test +431 -0
  1335. sqlglot_mypy-1.19.1/mypyc/test-data/run-u8.test +302 -0
  1336. sqlglot_mypy-1.19.1/mypyc/test-data/run-weakref.test +52 -0
  1337. sqlglot_mypy-1.19.1/mypyc/transform/__init__.py +0 -0
  1338. sqlglot_mypy-1.19.1/mypyc/transform/copy_propagation.py +94 -0
  1339. sqlglot_mypy-1.19.1/mypyc/transform/exceptions.py +182 -0
  1340. sqlglot_mypy-1.19.1/mypyc/transform/flag_elimination.py +107 -0
  1341. sqlglot_mypy-1.19.1/mypyc/transform/ir_transform.py +378 -0
  1342. sqlglot_mypy-1.19.1/mypyc/transform/log_trace.py +158 -0
  1343. sqlglot_mypy-1.19.1/mypyc/transform/lower.py +35 -0
  1344. sqlglot_mypy-1.19.1/mypyc/transform/refcount.py +298 -0
  1345. sqlglot_mypy-1.19.1/mypyc/transform/spill.py +113 -0
  1346. sqlglot_mypy-1.19.1/mypyc/transform/uninit.py +195 -0
  1347. sqlglot_mypy-1.19.1/pyproject.toml +249 -0
  1348. sqlglot_mypy-1.19.1/runtests.py +195 -0
  1349. sqlglot_mypy-1.19.1/setup.cfg +4 -0
  1350. sqlglot_mypy-1.19.1/setup.py +168 -0
  1351. sqlglot_mypy-1.19.1/sqlglot_mypy.egg-info/PKG-INFO +54 -0
  1352. sqlglot_mypy-1.19.1/sqlglot_mypy.egg-info/SOURCES.txt +1723 -0
  1353. sqlglot_mypy-1.19.1/sqlglot_mypy.egg-info/dependency_links.txt +1 -0
  1354. sqlglot_mypy-1.19.1/sqlglot_mypy.egg-info/entry_points.txt +6 -0
  1355. sqlglot_mypy-1.19.1/sqlglot_mypy.egg-info/requires.txt +26 -0
  1356. sqlglot_mypy-1.19.1/sqlglot_mypy.egg-info/top_level.txt +2 -0
  1357. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsx-pkg1/nsx/a/__init__.py +0 -0
  1358. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsx-pkg2/nsx/b/__init__.py +0 -0
  1359. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsx-pkg3/nsx/c/c +0 -0
  1360. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsx-pkg3/nsx/c/c.py +0 -0
  1361. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsy-pkg1/nsy/a/__init__.py +0 -0
  1362. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsy-pkg1/nsy/a/__init__.pyi +0 -0
  1363. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsy-pkg2/nsy/b/__init__.py +0 -0
  1364. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsy-pkg2/nsy/b.pyi +0 -0
  1365. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsy-pkg2/nsy/c.py +0 -0
  1366. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/nsy-pkg2/nsy/c.pyi +0 -0
  1367. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/pkg1/a +0 -0
  1368. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/pkg1/a.py +0 -0
  1369. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/pkg2/b/__init__.py +0 -0
  1370. sqlglot_mypy-1.19.1/test-data/packages/modulefinder/readme.txt +4 -0
  1371. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/baz/baz_pkg/__init__.py +0 -0
  1372. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/baz/baz_pkg/py.typed +0 -0
  1373. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/baz/ns_baz_pkg/a.py +0 -0
  1374. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/baz/ns_baz_pkg/py.typed +0 -0
  1375. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/foo/__init__.py +0 -0
  1376. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/foo/bar.py +1 -0
  1377. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/foo-stubs/__init__.pyi +0 -0
  1378. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/foo-stubs/bar.pyi +1 -0
  1379. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/foo-stubs/qux.pyi +1 -0
  1380. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_typed/a.py +1 -0
  1381. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_typed/b/c.py +1 -0
  1382. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_typed/py.typed +0 -0
  1383. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_untyped/a.py +1 -0
  1384. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_untyped/b/c.py +1 -0
  1385. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_w_stubs/typed/__init__.py +0 -0
  1386. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_w_stubs/typed_inline/__init__.py +0 -0
  1387. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_w_stubs/typed_inline/py.typed +0 -0
  1388. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_w_stubs/untyped/__init__.py +0 -0
  1389. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/ns_pkg_w_stubs-stubs/typed/__init__.pyi +0 -0
  1390. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed/__init__.py +1 -0
  1391. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed/a.py +1 -0
  1392. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed/b/__init__.py +1 -0
  1393. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed/b/c.py +1 -0
  1394. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed/py.typed +0 -0
  1395. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed_w_stubs/__init__.py +1 -0
  1396. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed_w_stubs/__init__.pyi +1 -0
  1397. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed_w_stubs/py.typed +0 -0
  1398. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed_w_stubs/spam.py +1 -0
  1399. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed_w_stubs/spam.pyi +1 -0
  1400. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed_w_stubs-stubs/__init__.pyi +1 -0
  1401. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_typed_w_stubs-stubs/spam.pyi +1 -0
  1402. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_untyped/__init__.py +1 -0
  1403. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_untyped/a.py +1 -0
  1404. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_untyped/b/__init__.py +1 -0
  1405. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/pkg_untyped/b/c.py +1 -0
  1406. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-site-packages/standalone.py +1 -0
  1407. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-src/neighbor_pkg/__init__.py +0 -0
  1408. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-src/neighbor_pkg/py.typed +0 -0
  1409. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-src/ns_neighbor_pkg/a.py +0 -0
  1410. sqlglot_mypy-1.19.1/test-data/packages/modulefinder-src/ns_neighbor_pkg/py.typed +0 -0
  1411. sqlglot_mypy-1.19.1/test-data/packages/typedpkg/pyproject.toml +8 -0
  1412. sqlglot_mypy-1.19.1/test-data/packages/typedpkg/typedpkg/__init__.py +0 -0
  1413. sqlglot_mypy-1.19.1/test-data/packages/typedpkg/typedpkg/dne.py +0 -0
  1414. sqlglot_mypy-1.19.1/test-data/packages/typedpkg/typedpkg/pkg/__init__.py +0 -0
  1415. sqlglot_mypy-1.19.1/test-data/packages/typedpkg/typedpkg/pkg/aaa.py +2 -0
  1416. sqlglot_mypy-1.19.1/test-data/packages/typedpkg/typedpkg/pkg/py.typed +0 -0
  1417. sqlglot_mypy-1.19.1/test-data/packages/typedpkg/typedpkg/py.typed +0 -0
  1418. sqlglot_mypy-1.19.1/test-data/packages/typedpkg/typedpkg/sample.py +7 -0
  1419. sqlglot_mypy-1.19.1/test-data/packages/typedpkg-stubs/pyproject.toml +11 -0
  1420. sqlglot_mypy-1.19.1/test-data/packages/typedpkg-stubs/typedpkg-stubs/__init__.pyi +0 -0
  1421. sqlglot_mypy-1.19.1/test-data/packages/typedpkg-stubs/typedpkg-stubs/py.typed +1 -0
  1422. sqlglot_mypy-1.19.1/test-data/packages/typedpkg-stubs/typedpkg-stubs/sample.pyi +2 -0
  1423. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_a/pyproject.toml +11 -0
  1424. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_a/typedpkg_ns/__init__.py +2 -0
  1425. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_a/typedpkg_ns/a/__init__.py +0 -0
  1426. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_a/typedpkg_ns/a/bbb.py +2 -0
  1427. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_a/typedpkg_ns/a/py.typed +0 -0
  1428. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_b/pyproject.toml +8 -0
  1429. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_b/typedpkg_ns/__init__.py +2 -0
  1430. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_b/typedpkg_ns/b/__init__.py +0 -0
  1431. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_b/typedpkg_ns/b/bbb.py +2 -0
  1432. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_b-stubs/pyproject.toml +11 -0
  1433. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_b-stubs/typedpkg_ns-stubs/b/__init__.pyi +0 -0
  1434. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_b-stubs/typedpkg_ns-stubs/b/bbb.pyi +1 -0
  1435. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_nested/pyproject.toml +11 -0
  1436. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_nested/typedpkg_ns/a/__init__.py +0 -0
  1437. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_nested/typedpkg_ns/a/py.typed +0 -0
  1438. sqlglot_mypy-1.19.1/test-data/packages/typedpkg_ns_nested/typedpkg_ns/b/__init__.py +0 -0
  1439. sqlglot_mypy-1.19.1/test-data/pybind11_fixtures/expected_stubs_no_docs/pybind11_fixtures/__init__.pyi +28 -0
  1440. sqlglot_mypy-1.19.1/test-data/pybind11_fixtures/expected_stubs_no_docs/pybind11_fixtures/demo.pyi +62 -0
  1441. sqlglot_mypy-1.19.1/test-data/pybind11_fixtures/expected_stubs_with_docs/pybind11_fixtures/__init__.pyi +56 -0
  1442. sqlglot_mypy-1.19.1/test-data/pybind11_fixtures/expected_stubs_with_docs/pybind11_fixtures/demo.pyi +136 -0
  1443. sqlglot_mypy-1.19.1/test-data/pybind11_fixtures/pyproject.toml +10 -0
  1444. sqlglot_mypy-1.19.1/test-data/pybind11_fixtures/setup.py +18 -0
  1445. sqlglot_mypy-1.19.1/test-data/pybind11_fixtures/src/main.cpp +279 -0
  1446. sqlglot_mypy-1.19.1/test-data/unit/README.md +231 -0
  1447. sqlglot_mypy-1.19.1/test-data/unit/check-abstract.test +1690 -0
  1448. sqlglot_mypy-1.19.1/test-data/unit/check-annotated.test +151 -0
  1449. sqlglot_mypy-1.19.1/test-data/unit/check-assert-type-fail.test +49 -0
  1450. sqlglot_mypy-1.19.1/test-data/unit/check-async-await.test +1082 -0
  1451. sqlglot_mypy-1.19.1/test-data/unit/check-basic.test +526 -0
  1452. sqlglot_mypy-1.19.1/test-data/unit/check-bound.test +229 -0
  1453. sqlglot_mypy-1.19.1/test-data/unit/check-callable.test +678 -0
  1454. sqlglot_mypy-1.19.1/test-data/unit/check-class-namedtuple.test +685 -0
  1455. sqlglot_mypy-1.19.1/test-data/unit/check-classes.test +9364 -0
  1456. sqlglot_mypy-1.19.1/test-data/unit/check-classvar.test +382 -0
  1457. sqlglot_mypy-1.19.1/test-data/unit/check-columns.test +424 -0
  1458. sqlglot_mypy-1.19.1/test-data/unit/check-ctypes.test +183 -0
  1459. sqlglot_mypy-1.19.1/test-data/unit/check-custom-plugin.test +1128 -0
  1460. sqlglot_mypy-1.19.1/test-data/unit/check-dataclass-transform.test +1074 -0
  1461. sqlglot_mypy-1.19.1/test-data/unit/check-dataclasses.test +2684 -0
  1462. sqlglot_mypy-1.19.1/test-data/unit/check-deprecated.test +922 -0
  1463. sqlglot_mypy-1.19.1/test-data/unit/check-dynamic-typing.test +832 -0
  1464. sqlglot_mypy-1.19.1/test-data/unit/check-enum.test +2683 -0
  1465. sqlglot_mypy-1.19.1/test-data/unit/check-errorcodes.test +1310 -0
  1466. sqlglot_mypy-1.19.1/test-data/unit/check-expressions.test +2494 -0
  1467. sqlglot_mypy-1.19.1/test-data/unit/check-fastparse.test +341 -0
  1468. sqlglot_mypy-1.19.1/test-data/unit/check-final.test +1338 -0
  1469. sqlglot_mypy-1.19.1/test-data/unit/check-flags.test +2517 -0
  1470. sqlglot_mypy-1.19.1/test-data/unit/check-formatting.test +633 -0
  1471. sqlglot_mypy-1.19.1/test-data/unit/check-functions.test +3710 -0
  1472. sqlglot_mypy-1.19.1/test-data/unit/check-functools.test +728 -0
  1473. sqlglot_mypy-1.19.1/test-data/unit/check-generic-alias.test +265 -0
  1474. sqlglot_mypy-1.19.1/test-data/unit/check-generic-subtyping.test +1236 -0
  1475. sqlglot_mypy-1.19.1/test-data/unit/check-generics.test +3624 -0
  1476. sqlglot_mypy-1.19.1/test-data/unit/check-ignore.test +302 -0
  1477. sqlglot_mypy-1.19.1/test-data/unit/check-incomplete-fixture.test +80 -0
  1478. sqlglot_mypy-1.19.1/test-data/unit/check-incremental.test +7638 -0
  1479. sqlglot_mypy-1.19.1/test-data/unit/check-inference-context.test +1600 -0
  1480. sqlglot_mypy-1.19.1/test-data/unit/check-inference.test +4263 -0
  1481. sqlglot_mypy-1.19.1/test-data/unit/check-inline-config.test +477 -0
  1482. sqlglot_mypy-1.19.1/test-data/unit/check-isinstance.test +3036 -0
  1483. sqlglot_mypy-1.19.1/test-data/unit/check-kwargs.test +569 -0
  1484. sqlglot_mypy-1.19.1/test-data/unit/check-lists.test +105 -0
  1485. sqlglot_mypy-1.19.1/test-data/unit/check-literal.test +3000 -0
  1486. sqlglot_mypy-1.19.1/test-data/unit/check-lowercase.test +35 -0
  1487. sqlglot_mypy-1.19.1/test-data/unit/check-modules-case.test +150 -0
  1488. sqlglot_mypy-1.19.1/test-data/unit/check-modules-fast.test +136 -0
  1489. sqlglot_mypy-1.19.1/test-data/unit/check-modules.test +3248 -0
  1490. sqlglot_mypy-1.19.1/test-data/unit/check-multiple-inheritance.test +734 -0
  1491. sqlglot_mypy-1.19.1/test-data/unit/check-namedtuple.test +1557 -0
  1492. sqlglot_mypy-1.19.1/test-data/unit/check-narrowing.test +2666 -0
  1493. sqlglot_mypy-1.19.1/test-data/unit/check-native-int.test +232 -0
  1494. sqlglot_mypy-1.19.1/test-data/unit/check-newsemanal.test +3277 -0
  1495. sqlglot_mypy-1.19.1/test-data/unit/check-newsyntax.test +129 -0
  1496. sqlglot_mypy-1.19.1/test-data/unit/check-newtype.test +387 -0
  1497. sqlglot_mypy-1.19.1/test-data/unit/check-optional.test +1344 -0
  1498. sqlglot_mypy-1.19.1/test-data/unit/check-overloading.test +6867 -0
  1499. sqlglot_mypy-1.19.1/test-data/unit/check-parameter-specification.test +2601 -0
  1500. sqlglot_mypy-1.19.1/test-data/unit/check-plugin-attrs.test +2497 -0
  1501. sqlglot_mypy-1.19.1/test-data/unit/check-plugin-error-codes.test +32 -0
  1502. sqlglot_mypy-1.19.1/test-data/unit/check-possibly-undefined.test +1045 -0
  1503. sqlglot_mypy-1.19.1/test-data/unit/check-protocols.test +4676 -0
  1504. sqlglot_mypy-1.19.1/test-data/unit/check-python310.test +3196 -0
  1505. sqlglot_mypy-1.19.1/test-data/unit/check-python311.test +323 -0
  1506. sqlglot_mypy-1.19.1/test-data/unit/check-python312.test +2225 -0
  1507. sqlglot_mypy-1.19.1/test-data/unit/check-python313.test +321 -0
  1508. sqlglot_mypy-1.19.1/test-data/unit/check-python314.test +3 -0
  1509. sqlglot_mypy-1.19.1/test-data/unit/check-python38.test +803 -0
  1510. sqlglot_mypy-1.19.1/test-data/unit/check-python39.test +25 -0
  1511. sqlglot_mypy-1.19.1/test-data/unit/check-recursive-types.test +1042 -0
  1512. sqlglot_mypy-1.19.1/test-data/unit/check-redefine.test +638 -0
  1513. sqlglot_mypy-1.19.1/test-data/unit/check-redefine2.test +1199 -0
  1514. sqlglot_mypy-1.19.1/test-data/unit/check-reports.test +345 -0
  1515. sqlglot_mypy-1.19.1/test-data/unit/check-selftype.test +2380 -0
  1516. sqlglot_mypy-1.19.1/test-data/unit/check-semanal-error.test +183 -0
  1517. sqlglot_mypy-1.19.1/test-data/unit/check-serialize.test +1417 -0
  1518. sqlglot_mypy-1.19.1/test-data/unit/check-singledispatch.test +309 -0
  1519. sqlglot_mypy-1.19.1/test-data/unit/check-slots.test +563 -0
  1520. sqlglot_mypy-1.19.1/test-data/unit/check-statements.test +2363 -0
  1521. sqlglot_mypy-1.19.1/test-data/unit/check-super.test +434 -0
  1522. sqlglot_mypy-1.19.1/test-data/unit/check-tuples.test +1826 -0
  1523. sqlglot_mypy-1.19.1/test-data/unit/check-type-aliases.test +1443 -0
  1524. sqlglot_mypy-1.19.1/test-data/unit/check-type-checks.test +117 -0
  1525. sqlglot_mypy-1.19.1/test-data/unit/check-type-object-type-inference.test +41 -0
  1526. sqlglot_mypy-1.19.1/test-data/unit/check-type-promotion.test +205 -0
  1527. sqlglot_mypy-1.19.1/test-data/unit/check-typeddict.test +4549 -0
  1528. sqlglot_mypy-1.19.1/test-data/unit/check-typeform.test +842 -0
  1529. sqlglot_mypy-1.19.1/test-data/unit/check-typeguard.test +899 -0
  1530. sqlglot_mypy-1.19.1/test-data/unit/check-typeis.test +952 -0
  1531. sqlglot_mypy-1.19.1/test-data/unit/check-typevar-defaults.test +882 -0
  1532. sqlglot_mypy-1.19.1/test-data/unit/check-typevar-tuple.test +2741 -0
  1533. sqlglot_mypy-1.19.1/test-data/unit/check-typevar-unbound.test +118 -0
  1534. sqlglot_mypy-1.19.1/test-data/unit/check-typevar-values.test +746 -0
  1535. sqlglot_mypy-1.19.1/test-data/unit/check-underscores.test +5 -0
  1536. sqlglot_mypy-1.19.1/test-data/unit/check-union-error-syntax.test +79 -0
  1537. sqlglot_mypy-1.19.1/test-data/unit/check-union-or-syntax.test +250 -0
  1538. sqlglot_mypy-1.19.1/test-data/unit/check-unions.test +1374 -0
  1539. sqlglot_mypy-1.19.1/test-data/unit/check-unreachable-code.test +1652 -0
  1540. sqlglot_mypy-1.19.1/test-data/unit/check-unsupported.test +17 -0
  1541. sqlglot_mypy-1.19.1/test-data/unit/check-varargs.test +1124 -0
  1542. sqlglot_mypy-1.19.1/test-data/unit/check-warnings.test +262 -0
  1543. sqlglot_mypy-1.19.1/test-data/unit/cmdline.pyproject.test +239 -0
  1544. sqlglot_mypy-1.19.1/test-data/unit/cmdline.test +1413 -0
  1545. sqlglot_mypy-1.19.1/test-data/unit/daemon.test +804 -0
  1546. sqlglot_mypy-1.19.1/test-data/unit/deps-classes.test +250 -0
  1547. sqlglot_mypy-1.19.1/test-data/unit/deps-expressions.test +436 -0
  1548. sqlglot_mypy-1.19.1/test-data/unit/deps-generics.test +204 -0
  1549. sqlglot_mypy-1.19.1/test-data/unit/deps-statements.test +634 -0
  1550. sqlglot_mypy-1.19.1/test-data/unit/deps-types.test +1028 -0
  1551. sqlglot_mypy-1.19.1/test-data/unit/deps.test +1460 -0
  1552. sqlglot_mypy-1.19.1/test-data/unit/diff.test +1635 -0
  1553. sqlglot_mypy-1.19.1/test-data/unit/envvars.test +10 -0
  1554. sqlglot_mypy-1.19.1/test-data/unit/errorstream.test +54 -0
  1555. sqlglot_mypy-1.19.1/test-data/unit/exportjson.test +280 -0
  1556. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-attr.test +82 -0
  1557. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-blockers.test +568 -0
  1558. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-cache-incremental.test +241 -0
  1559. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-cycles.test +221 -0
  1560. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-dataclass-transform.test +140 -0
  1561. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-dataclass.test +25 -0
  1562. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-follow-imports.test +848 -0
  1563. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-inspect.test +269 -0
  1564. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-modules.test +2262 -0
  1565. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-python312.test +117 -0
  1566. sqlglot_mypy-1.19.1/test-data/unit/fine-grained-suggest.test +1275 -0
  1567. sqlglot_mypy-1.19.1/test-data/unit/fine-grained.test +11520 -0
  1568. sqlglot_mypy-1.19.1/test-data/unit/fixtures/__init_subclass__.pyi +14 -0
  1569. sqlglot_mypy-1.19.1/test-data/unit/fixtures/__new__.pyi +20 -0
  1570. sqlglot_mypy-1.19.1/test-data/unit/fixtures/alias.pyi +16 -0
  1571. sqlglot_mypy-1.19.1/test-data/unit/fixtures/any.pyi +10 -0
  1572. sqlglot_mypy-1.19.1/test-data/unit/fixtures/args.pyi +35 -0
  1573. sqlglot_mypy-1.19.1/test-data/unit/fixtures/async_await.pyi +26 -0
  1574. sqlglot_mypy-1.19.1/test-data/unit/fixtures/bool.pyi +20 -0
  1575. sqlglot_mypy-1.19.1/test-data/unit/fixtures/callable.pyi +31 -0
  1576. sqlglot_mypy-1.19.1/test-data/unit/fixtures/classmethod.pyi +31 -0
  1577. sqlglot_mypy-1.19.1/test-data/unit/fixtures/complex.pyi +13 -0
  1578. sqlglot_mypy-1.19.1/test-data/unit/fixtures/complex_tuple.pyi +16 -0
  1579. sqlglot_mypy-1.19.1/test-data/unit/fixtures/dataclasses.pyi +56 -0
  1580. sqlglot_mypy-1.19.1/test-data/unit/fixtures/dict-full.pyi +83 -0
  1581. sqlglot_mypy-1.19.1/test-data/unit/fixtures/dict.pyi +64 -0
  1582. sqlglot_mypy-1.19.1/test-data/unit/fixtures/divmod.pyi +23 -0
  1583. sqlglot_mypy-1.19.1/test-data/unit/fixtures/enum.pyi +25 -0
  1584. sqlglot_mypy-1.19.1/test-data/unit/fixtures/exception.pyi +30 -0
  1585. sqlglot_mypy-1.19.1/test-data/unit/fixtures/f_string.pyi +38 -0
  1586. sqlglot_mypy-1.19.1/test-data/unit/fixtures/fine_grained.pyi +30 -0
  1587. sqlglot_mypy-1.19.1/test-data/unit/fixtures/float.pyi +36 -0
  1588. sqlglot_mypy-1.19.1/test-data/unit/fixtures/floatdict.pyi +66 -0
  1589. sqlglot_mypy-1.19.1/test-data/unit/fixtures/for.pyi +24 -0
  1590. sqlglot_mypy-1.19.1/test-data/unit/fixtures/function.pyi +8 -0
  1591. sqlglot_mypy-1.19.1/test-data/unit/fixtures/isinstance.pyi +30 -0
  1592. sqlglot_mypy-1.19.1/test-data/unit/fixtures/isinstance_python3_10.pyi +31 -0
  1593. sqlglot_mypy-1.19.1/test-data/unit/fixtures/isinstancelist.pyi +63 -0
  1594. sqlglot_mypy-1.19.1/test-data/unit/fixtures/len.pyi +39 -0
  1595. sqlglot_mypy-1.19.1/test-data/unit/fixtures/list.pyi +41 -0
  1596. sqlglot_mypy-1.19.1/test-data/unit/fixtures/literal__new__.pyi +25 -0
  1597. sqlglot_mypy-1.19.1/test-data/unit/fixtures/module.pyi +24 -0
  1598. sqlglot_mypy-1.19.1/test-data/unit/fixtures/module_all.pyi +20 -0
  1599. sqlglot_mypy-1.19.1/test-data/unit/fixtures/narrowing.pyi +20 -0
  1600. sqlglot_mypy-1.19.1/test-data/unit/fixtures/notimplemented.pyi +25 -0
  1601. sqlglot_mypy-1.19.1/test-data/unit/fixtures/object_hashable.pyi +10 -0
  1602. sqlglot_mypy-1.19.1/test-data/unit/fixtures/object_with_init_subclass.pyi +61 -0
  1603. sqlglot_mypy-1.19.1/test-data/unit/fixtures/ops.pyi +76 -0
  1604. sqlglot_mypy-1.19.1/test-data/unit/fixtures/paramspec.pyi +79 -0
  1605. sqlglot_mypy-1.19.1/test-data/unit/fixtures/plugin_attrs.pyi +39 -0
  1606. sqlglot_mypy-1.19.1/test-data/unit/fixtures/primitives.pyi +78 -0
  1607. sqlglot_mypy-1.19.1/test-data/unit/fixtures/property.pyi +25 -0
  1608. sqlglot_mypy-1.19.1/test-data/unit/fixtures/set.pyi +30 -0
  1609. sqlglot_mypy-1.19.1/test-data/unit/fixtures/slice.pyi +19 -0
  1610. sqlglot_mypy-1.19.1/test-data/unit/fixtures/staticmethod.pyi +22 -0
  1611. sqlglot_mypy-1.19.1/test-data/unit/fixtures/transform.pyi +32 -0
  1612. sqlglot_mypy-1.19.1/test-data/unit/fixtures/tuple-simple.pyi +21 -0
  1613. sqlglot_mypy-1.19.1/test-data/unit/fixtures/tuple.pyi +57 -0
  1614. sqlglot_mypy-1.19.1/test-data/unit/fixtures/type.pyi +35 -0
  1615. sqlglot_mypy-1.19.1/test-data/unit/fixtures/typing-async.pyi +136 -0
  1616. sqlglot_mypy-1.19.1/test-data/unit/fixtures/typing-full.pyi +229 -0
  1617. sqlglot_mypy-1.19.1/test-data/unit/fixtures/typing-medium.pyi +73 -0
  1618. sqlglot_mypy-1.19.1/test-data/unit/fixtures/typing-namedtuple.pyi +31 -0
  1619. sqlglot_mypy-1.19.1/test-data/unit/fixtures/typing-override.pyi +26 -0
  1620. sqlglot_mypy-1.19.1/test-data/unit/fixtures/typing-typeddict-iror.pyi +68 -0
  1621. sqlglot_mypy-1.19.1/test-data/unit/fixtures/typing-typeddict.pyi +83 -0
  1622. sqlglot_mypy-1.19.1/test-data/unit/fixtures/union.pyi +18 -0
  1623. sqlglot_mypy-1.19.1/test-data/unit/hacks.txt +99 -0
  1624. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/_decimal.pyi +4 -0
  1625. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/_typeshed.pyi +8 -0
  1626. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/_weakref.pyi +11 -0
  1627. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/abc.pyi +9 -0
  1628. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/attr/__init__.pyi +253 -0
  1629. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/attr/converters.pyi +12 -0
  1630. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/attrs/__init__.pyi +148 -0
  1631. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/attrs/converters.pyi +12 -0
  1632. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/blocker.pyi +2 -0
  1633. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/blocker2.pyi +2 -0
  1634. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/broken.pyi +2 -0
  1635. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/builtins.pyi +35 -0
  1636. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/collections.pyi +25 -0
  1637. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/contextlib.pyi +13 -0
  1638. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/dataclasses.pyi +52 -0
  1639. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/datetime.pyi +16 -0
  1640. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/decimal.pyi +3 -0
  1641. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/enum.pyi +67 -0
  1642. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/functools.pyi +39 -0
  1643. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/future/__init__.pyi +1 -0
  1644. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/future/utils.pyi +2 -0
  1645. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/math.pyi +20 -0
  1646. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/mypy_extensions.pyi +173 -0
  1647. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/native_internal.pyi +16 -0
  1648. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/numbers.pyi +10 -0
  1649. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/six.pyi +3 -0
  1650. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/sys.pyi +2 -0
  1651. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/traceback.pyi +3 -0
  1652. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/types.pyi +21 -0
  1653. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/typing.pyi +68 -0
  1654. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/typing_extensions.pyi +100 -0
  1655. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/unannotated_lib.pyi +1 -0
  1656. sqlglot_mypy-1.19.1/test-data/unit/lib-stub/weakref.pyi +23 -0
  1657. sqlglot_mypy-1.19.1/test-data/unit/merge.test +1560 -0
  1658. sqlglot_mypy-1.19.1/test-data/unit/outputjson.test +44 -0
  1659. sqlglot_mypy-1.19.1/test-data/unit/parse-errors.test +445 -0
  1660. sqlglot_mypy-1.19.1/test-data/unit/parse-python310.test +603 -0
  1661. sqlglot_mypy-1.19.1/test-data/unit/parse-python312.test +90 -0
  1662. sqlglot_mypy-1.19.1/test-data/unit/parse-python313.test +80 -0
  1663. sqlglot_mypy-1.19.1/test-data/unit/parse-python314.test +5 -0
  1664. sqlglot_mypy-1.19.1/test-data/unit/parse.test +3854 -0
  1665. sqlglot_mypy-1.19.1/test-data/unit/pep561.test +235 -0
  1666. sqlglot_mypy-1.19.1/test-data/unit/plugins/add_classmethod.py +30 -0
  1667. sqlglot_mypy-1.19.1/test-data/unit/plugins/add_method.py +23 -0
  1668. sqlglot_mypy-1.19.1/test-data/unit/plugins/add_overloaded_method.py +41 -0
  1669. sqlglot_mypy-1.19.1/test-data/unit/plugins/arg_kinds.py +32 -0
  1670. sqlglot_mypy-1.19.1/test-data/unit/plugins/arg_names.py +51 -0
  1671. sqlglot_mypy-1.19.1/test-data/unit/plugins/attrhook.py +23 -0
  1672. sqlglot_mypy-1.19.1/test-data/unit/plugins/attrhook2.py +37 -0
  1673. sqlglot_mypy-1.19.1/test-data/unit/plugins/badreturn.py +2 -0
  1674. sqlglot_mypy-1.19.1/test-data/unit/plugins/badreturn2.py +9 -0
  1675. sqlglot_mypy-1.19.1/test-data/unit/plugins/callable_instance.py +30 -0
  1676. sqlglot_mypy-1.19.1/test-data/unit/plugins/class_attr_hook.py +23 -0
  1677. sqlglot_mypy-1.19.1/test-data/unit/plugins/class_callable.py +43 -0
  1678. sqlglot_mypy-1.19.1/test-data/unit/plugins/common_api_incremental.py +48 -0
  1679. sqlglot_mypy-1.19.1/test-data/unit/plugins/config_data.py +19 -0
  1680. sqlglot_mypy-1.19.1/test-data/unit/plugins/custom_errorcode.py +24 -0
  1681. sqlglot_mypy-1.19.1/test-data/unit/plugins/customentry.py +22 -0
  1682. sqlglot_mypy-1.19.1/test-data/unit/plugins/customize_mro.py +17 -0
  1683. sqlglot_mypy-1.19.1/test-data/unit/plugins/decimal_to_int.py +21 -0
  1684. sqlglot_mypy-1.19.1/test-data/unit/plugins/depshook.py +15 -0
  1685. sqlglot_mypy-1.19.1/test-data/unit/plugins/descriptor.py +44 -0
  1686. sqlglot_mypy-1.19.1/test-data/unit/plugins/dyn_class.py +57 -0
  1687. sqlglot_mypy-1.19.1/test-data/unit/plugins/dyn_class_from_method.py +76 -0
  1688. sqlglot_mypy-1.19.1/test-data/unit/plugins/fnplugin.py +22 -0
  1689. sqlglot_mypy-1.19.1/test-data/unit/plugins/fully_qualified_test_hook.py +28 -0
  1690. sqlglot_mypy-1.19.1/test-data/unit/plugins/function_sig_hook.py +27 -0
  1691. sqlglot_mypy-1.19.1/test-data/unit/plugins/magic_method.py +24 -0
  1692. sqlglot_mypy-1.19.1/test-data/unit/plugins/method_in_decorator.py +25 -0
  1693. sqlglot_mypy-1.19.1/test-data/unit/plugins/method_sig_hook.py +41 -0
  1694. sqlglot_mypy-1.19.1/test-data/unit/plugins/named_callable.py +33 -0
  1695. sqlglot_mypy-1.19.1/test-data/unit/plugins/noentry.py +1 -0
  1696. sqlglot_mypy-1.19.1/test-data/unit/plugins/plugin2.py +21 -0
  1697. sqlglot_mypy-1.19.1/test-data/unit/plugins/type_anal_hook.py +38 -0
  1698. sqlglot_mypy-1.19.1/test-data/unit/plugins/union_method.py +55 -0
  1699. sqlglot_mypy-1.19.1/test-data/unit/pythoneval-asyncio.test +481 -0
  1700. sqlglot_mypy-1.19.1/test-data/unit/pythoneval.test +2225 -0
  1701. sqlglot_mypy-1.19.1/test-data/unit/ref-info.test +83 -0
  1702. sqlglot_mypy-1.19.1/test-data/unit/reports.test +598 -0
  1703. sqlglot_mypy-1.19.1/test-data/unit/semanal-abstractclasses.test +119 -0
  1704. sqlglot_mypy-1.19.1/test-data/unit/semanal-basic.test +527 -0
  1705. sqlglot_mypy-1.19.1/test-data/unit/semanal-classes.test +634 -0
  1706. sqlglot_mypy-1.19.1/test-data/unit/semanal-classvar.test +209 -0
  1707. sqlglot_mypy-1.19.1/test-data/unit/semanal-errors-python310.test +43 -0
  1708. sqlglot_mypy-1.19.1/test-data/unit/semanal-errors.test +1499 -0
  1709. sqlglot_mypy-1.19.1/test-data/unit/semanal-expressions.test +406 -0
  1710. sqlglot_mypy-1.19.1/test-data/unit/semanal-lambda.test +94 -0
  1711. sqlglot_mypy-1.19.1/test-data/unit/semanal-literal.test +27 -0
  1712. sqlglot_mypy-1.19.1/test-data/unit/semanal-modules.test +930 -0
  1713. sqlglot_mypy-1.19.1/test-data/unit/semanal-namedtuple.test +247 -0
  1714. sqlglot_mypy-1.19.1/test-data/unit/semanal-python310.test +214 -0
  1715. sqlglot_mypy-1.19.1/test-data/unit/semanal-statements.test +1315 -0
  1716. sqlglot_mypy-1.19.1/test-data/unit/semanal-symtable.test +96 -0
  1717. sqlglot_mypy-1.19.1/test-data/unit/semanal-typealiases.test +446 -0
  1718. sqlglot_mypy-1.19.1/test-data/unit/semanal-typeddict.test +48 -0
  1719. sqlglot_mypy-1.19.1/test-data/unit/semanal-typeinfo.test +91 -0
  1720. sqlglot_mypy-1.19.1/test-data/unit/semanal-types.test +1589 -0
  1721. sqlglot_mypy-1.19.1/test-data/unit/stubgen.test +4758 -0
  1722. sqlglot_mypy-1.19.1/test-data/unit/typexport-basic.test +1279 -0
  1723. sqlglot_mypy-1.19.1/test-requirements.in +16 -0
  1724. sqlglot_mypy-1.19.1/test-requirements.txt +75 -0
  1725. sqlglot_mypy-1.19.1/tox.ini +66 -0
@@ -0,0 +1,4191 @@
1
+ # Mypy Release Notes
2
+
3
+ ## Next Release
4
+
5
+ ## Mypy 1.19
6
+
7
+ We’ve just uploaded mypy 1.19.0 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
8
+ Mypy is a static type checker for Python. This release includes new features, performance
9
+ improvements and bug fixes. You can install it as follows:
10
+
11
+ python3 -m pip install -U mypy
12
+
13
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
14
+
15
+ ### Performance Improvements
16
+ - Switch to a more dynamic SCC processing logic (Ivan Levkivskyi, PR [20053](https://github.com/python/mypy/pull/20053))
17
+ - Speed up type aliases (Ivan Levkivskyi, PR [19810](https://github.com/python/mypy/pull/19810))
18
+
19
+ ### Fixed‑Format Cache Improvements
20
+
21
+ Mypy uses a cache by default to speed up incremental runs by reusing partial results
22
+ from earlier runs. Mypy 1.18 added a new binary fixed-format cache representation as
23
+ an experimental feature. The feature is no longer experimental, and we are planning
24
+ to enable it by default in a future mypy release (possibly 1.20), since it's faster
25
+ and uses less space than the original, JSON-based cache format. Use
26
+ `--fixed-format-cache` to enable the fixed-format cache.
27
+
28
+ Mypy now has an extra dependency on the `librt` PyPI package, as it's needed for
29
+ cache serialization and deserialization.
30
+
31
+ Mypy ships with a tool to convert fixed-format cache files to the old JSON format.
32
+ Example of how to use this:
33
+ ```
34
+ $ python -m mypy.exportjson .mypy_cache/.../my_module.data.ff
35
+ ```
36
+
37
+ This way existing use cases that parse JSON cache files can be supported when using
38
+ the new format, though an extra conversion step is needed.
39
+
40
+ This release includes these improvements:
41
+
42
+ - Force-discard cache if cache format changed (Ivan Levkivskyi, PR [20152](https://github.com/python/mypy/pull/20152))
43
+ - Add tool to convert binary cache files to JSON (Jukka Lehtosalo, PR [20071](https://github.com/python/mypy/pull/20071))
44
+ - Use more efficient serialization format for long integers in cache files (Jukka Lehtosalo, PR [20151](https://github.com/python/mypy/pull/20151))
45
+ - More robust packing of floats in fixed-format cache (Ivan Levkivskyi, PR [20150](https://github.com/python/mypy/pull/20150))
46
+ - Use self-descriptive cache with type tags (Ivan Levkivskyi, PR [20137](https://github.com/python/mypy/pull/20137))
47
+ - Use fixed format for cache metas (Ivan Levkivskyi, PR [20088](https://github.com/python/mypy/pull/20088))
48
+ - Make metas more compact; fix indirect suppression (Ivan Levkivskyi, PR [20075](https://github.com/python/mypy/pull/20075))
49
+ - Use dedicated tags for most common cached instances (Ivan Levkivskyi, PR [19762](https://github.com/python/mypy/pull/19762))
50
+
51
+ ### PEP 747: Annotating Type Forms
52
+
53
+ Mypy now recognizes `TypeForm[T]` as a type and implements
54
+ [PEP 747](https://peps.python.org/pep-0747/). The feature is still experimental,
55
+ and it's disabled by default. Use `--enable-incomplete-feature=TypeForm` to
56
+ enable type forms. A type form object captures the type information provided by a
57
+ runtime type expression. Example:
58
+
59
+ ```python
60
+ from typing_extensions import TypeForm
61
+
62
+ def trycast[T](typx: TypeForm[T], value: object) -> T | None: ...
63
+
64
+ def example(o: object) -> None:
65
+ # 'int | str' below is an expression that represents a type.
66
+ # Unlike type[T], TypeForm[T] can be used with all kinds of types,
67
+ # including union types.
68
+ x = trycast(int | str, o)
69
+ if x is not None:
70
+ # Type of 'x' is 'int | str' here
71
+ ...
72
+ ```
73
+
74
+ This feature was contributed by David Foster (PR [19596](https://github.com/python/mypy/pull/19596)).
75
+
76
+ ### Fixes to Crashes
77
+ - Do not push partial types to the binder (Stanislav Terliakov, PR [20202](https://github.com/python/mypy/pull/20202))
78
+ - Fix crash on recursive tuple with Hashable (Ivan Levkivskyi, PR [20232](https://github.com/python/mypy/pull/20232))
79
+ - Fix crash related to decorated functions (Stanislav Terliakov, PR [20203](https://github.com/python/mypy/pull/20203))
80
+ - Do not abort constructing TypeAlias if only type parameters hold us back (Stanislav Terliakov, PR [20162](https://github.com/python/mypy/pull/20162))
81
+ - Use the fallback for `ModuleSpec` early if it can never be resolved (Stanislav Terliakov, PR [20167](https://github.com/python/mypy/pull/20167))
82
+ - Do not store deferred NamedTuple fields as redefinitions (Stanislav Terliakov, PR [20147](https://github.com/python/mypy/pull/20147))
83
+ - Discard partial types remaining after inference failure (Stanislav Terliakov, PR [20126](https://github.com/python/mypy/pull/20126))
84
+ - Fix an infinite recursion bug (Stanislav Terliakov, PR [20127](https://github.com/python/mypy/pull/20127))
85
+ - Fix IsADirectoryError for namespace packages when using --linecoverage-report (wyattscarpenter, PR [20109](https://github.com/python/mypy/pull/20109))
86
+ - Fix an internal error when creating cobertura output for namespace package (wyattscarpenter, PR [20112](https://github.com/python/mypy/pull/20112))
87
+ - Allow type parameters reusing the name missing from current module (Stanislav Terliakov, PR [20081](https://github.com/python/mypy/pull/20081))
88
+ - Prevent TypeGuardedType leak from narrowing declared type as part of type variable bound (Stanislav Terliakov, PR [20046](https://github.com/python/mypy/pull/20046))
89
+ - Fix crash on invalid unpack in base class (Ivan Levkivskyi, PR [19962](https://github.com/python/mypy/pull/19962))
90
+ - Traverse ParamSpec prefix where we should (Ivan Levkivskyi, PR [19800](https://github.com/python/mypy/pull/19800))
91
+ - Fix daemon crash related to imports (Ivan Levkivskyi, PR [20271](https://github.com/python/mypy/pull/20271))
92
+
93
+ ### Mypyc: Support for `__getattr__`, `__setattr__`, and `__delattr__`
94
+
95
+ Mypyc now has partial support for `__getattr__`, `__setattr__` and
96
+ `__delattr__` methods in native classes.
97
+
98
+ Note that native attributes are not stored using `__dict__`. Setting attributes
99
+ directly while bypassing `__setattr__` is possible by using
100
+ `super().__setattr__(...)` or `object.__setattr__(...)`, but not via `__dict__`.
101
+
102
+ Example:
103
+ ```python
104
+ class Demo:
105
+ _data: dict[str, str]
106
+
107
+ def __init__(self) -> None:
108
+ # Initialize data dict without calling our __setattr__
109
+ super().__setattr__("_data", {})
110
+
111
+ def __setattr__(self, name: str, value: str) -> None:
112
+ print(f"Setting {name} = {value!r}")
113
+
114
+ if name == "_data":
115
+ raise AttributeError("'_data' cannot be set")
116
+
117
+ self._data[name] = value
118
+
119
+ def __getattr__(self, name: str) -> str:
120
+ print(f"Getting {name}")
121
+
122
+ try:
123
+ return self._data[name]
124
+ except KeyError:
125
+ raise AttributeError(name)
126
+
127
+ d = Demo()
128
+ d.x = "hello"
129
+ d.y = "world"
130
+
131
+ print(d.x)
132
+ print(d.y)
133
+ ```
134
+
135
+ Related PRs:
136
+ - Generate `__setattr__` wrapper (Piotr Sawicki, PR [19937](https://github.com/python/mypy/pull/19937))
137
+ - Generate `__getattr__` wrapper (Piotr Sawicki, PR [19909](https://github.com/python/mypy/pull/19909))
138
+ - Support deleting attributes in `__setattr__` wrapper (Piotr Sawicki, PR [19997](https://github.com/python/mypy/pull/19997))
139
+
140
+ ### Miscellaneous Mypyc Improvements
141
+ - Fix `__new__` in native classes with inheritance (Piotr Sawicki, PR [20302](https://github.com/python/mypy/pull/20302))
142
+ - Fix crash on `super` in generator (Ivan Levkivskyi, PR [20291](https://github.com/python/mypy/pull/20291))
143
+ - Fix calling base class async method using `super()` (Jukka Lehtosalo, PR [20254](https://github.com/python/mypy/pull/20254))
144
+ - Fix async or generator methods in traits (Jukka Lehtosalo, PR [20246](https://github.com/python/mypy/pull/20246))
145
+ - Optimize equality check with string literals (BobTheBuidler, PR [19883](https://github.com/python/mypy/pull/19883))
146
+ - Fix inheritance of async defs (Jukka Lehtosalo, PR [20044](https://github.com/python/mypy/pull/20044))
147
+ - Reject invalid `mypyc_attr` args (BobTheBuidler, PR [19963](https://github.com/python/mypy/pull/19963))
148
+ - Optimize `isinstance` with tuple of primitive types (BobTheBuidler, PR [19949](https://github.com/python/mypy/pull/19949))
149
+ - Optimize away first index check in for loops if length > 1 (BobTheBuidler, PR [19933](https://github.com/python/mypy/pull/19933))
150
+ - Fix broken exception/cancellation handling in async def (Jukka Lehtosalo, PR [19951](https://github.com/python/mypy/pull/19951))
151
+ - Transform `object.__new__` inside `__new__` (Piotr Sawicki, PR [19866](https://github.com/python/mypy/pull/19866))
152
+ - Fix crash with NewType and other non-class types in incremental builds (Jukka Lehtosalo, PR [19837](https://github.com/python/mypy/pull/19837))
153
+ - Optimize container creation from expressions with length known at compile time (BobTheBuidler, PR [19503](https://github.com/python/mypy/pull/19503))
154
+ - Allow per-class free list to be used with inheritance (Jukka Lehtosalo, PR [19790](https://github.com/python/mypy/pull/19790))
155
+ - Fix object finalization (Marc Mueller, PR [19749](https://github.com/python/mypy/pull/19749))
156
+ - Allow defining a single-item free "list" for a native class (Jukka Lehtosalo, PR [19785](https://github.com/python/mypy/pull/19785))
157
+ - Speed up unary "not" (Jukka Lehtosalo, PR [19774](https://github.com/python/mypy/pull/19774))
158
+
159
+ ### Stubtest Improvements
160
+ - Check `_value_` for ellipsis-valued stub enum members (Stanislav Terliakov, PR [19760](https://github.com/python/mypy/pull/19760))
161
+ - Include function name in overload assertion messages (Joren Hammudoglu, PR [20063](https://github.com/python/mypy/pull/20063))
162
+ - Fix special case in analyzing function signature (iap, PR [19822](https://github.com/python/mypy/pull/19822))
163
+ - Improve `allowlist` docs with better example (sobolevn, PR [20007](https://github.com/python/mypy/pull/20007))
164
+
165
+ ### Documentation Updates
166
+ - Update duck type compatibility: mention strict-bytes and mypy 2.0 (wyattscarpenter, PR [20121](https://github.com/python/mypy/pull/20121))
167
+ - Document `--enable-incomplete-feature TypeForm` (wyattscarpenter, PR [20173](https://github.com/python/mypy/pull/20173))
168
+ - Change the inline TypedDict example (wyattscarpenter, PR [20172](https://github.com/python/mypy/pull/20172))
169
+ - Replace `List` with built‑in `list` (PEP 585) (Thiago J. Barbalho, PR [20000](https://github.com/python/mypy/pull/20000))
170
+ - Improve junit documentation (wyattscarpenter, PR [19867](https://github.com/python/mypy/pull/19867))
171
+
172
+ ### Other Notable Fixes and Improvements
173
+ - Fix annotated with function as type keyword list parameter (KarelKenens, PR [20094](https://github.com/python/mypy/pull/20094))
174
+ - Fix errors for raise NotImplemented (Shantanu, PR [20168](https://github.com/python/mypy/pull/20168))
175
+ - Don't let help formatter line-wrap URLs (Frank Dana, PR [19825](https://github.com/python/mypy/pull/19825))
176
+ - Do not cache fast container types inside lambdas (Stanislav Terliakov, PR [20166](https://github.com/python/mypy/pull/20166))
177
+ - Respect force-union-syntax flag in error hint (Marc Mueller, PR [20165](https://github.com/python/mypy/pull/20165))
178
+ - Fix type checking of dict type aliases (Shantanu, PR [20170](https://github.com/python/mypy/pull/20170))
179
+ - Use pretty callable formatting more often for callable expressions (Theodore Ando, PR [20128](https://github.com/python/mypy/pull/20128))
180
+ - Use dummy concrete type instead of `Any` when checking protocol variance (bzoracler, PR [20110](https://github.com/python/mypy/pull/20110))
181
+ - PEP 696: Fix swapping TypeVars with defaults (Randolf Scholz, PR [19449](https://github.com/python/mypy/pull/19449))
182
+ - Fix narrowing of class pattern with union type (Randolf Scholz, PR [19517](https://github.com/python/mypy/pull/19517))
183
+ - Do not emit unreachable warnings for lines that return `NotImplemented` (Christoph Tyralla, PR [20083](https://github.com/python/mypy/pull/20083))
184
+ - Fix matching against `typing.Callable` and `Protocol` types (Randolf Scholz, PR [19471](https://github.com/python/mypy/pull/19471))
185
+ - Make `--pretty` work better on multi-line issues (A5rocks, PR [20056](https://github.com/python/mypy/pull/20056))
186
+ - More precise return types for `TypedDict.get` (Randolf Scholz, PR [19897](https://github.com/python/mypy/pull/19897))
187
+ - Prevent false unreachable warnings for `@final` instances that occur when strict optional checking is disabled (Christoph Tyralla, PR [20045](https://github.com/python/mypy/pull/20045))
188
+ - Check class references to catch non-existent classes in match cases (A5rocks, PR [20042](https://github.com/python/mypy/pull/20042))
189
+ - Do not sort unused error codes in unused error codes warning (wyattscarpenter, PR [20036](https://github.com/python/mypy/pull/20036))
190
+ - Fix `[name-defined]` false positive in `class A[X, Y=X]:` case (sobolevn, PR [20021](https://github.com/python/mypy/pull/20021))
191
+ - Filter SyntaxWarnings during AST parsing (Marc Mueller, PR [20023](https://github.com/python/mypy/pull/20023))
192
+ - Make untyped decorator its own error code (wyattscarpenter, PR [19911](https://github.com/python/mypy/pull/19911))
193
+ - Support error codes from plugins in options (Sigve Sebastian Farstad, PR [19719](https://github.com/python/mypy/pull/19719))
194
+ - Allow returning Literals in `__new__` (James Hilton-Balfe, PR [15687](https://github.com/python/mypy/pull/15687))
195
+ - Inverse interface freshness logic (Ivan Levkivskyi, PR [19809](https://github.com/python/mypy/pull/19809))
196
+ - Do not report exhaustive-match after deferral (Stanislav Terliakov, PR [19804](https://github.com/python/mypy/pull/19804))
197
+ - Make `untyped_calls_exclude` invalidate cache (Ivan Levkivskyi, PR [19801](https://github.com/python/mypy/pull/19801))
198
+ - Add await to empty context hack (Stanislav Terliakov, PR [19777](https://github.com/python/mypy/pull/19777))
199
+ - Consider non-empty enums assignable to Self (Stanislav Terliakov, PR [19779](https://github.com/python/mypy/pull/19779))
200
+
201
+ ### Typeshed updates
202
+
203
+ Please see [git log](https://github.com/python/typeshed/commits/main?after=ebce8d766b41fbf4d83cf47c1297563a9508ff60+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
204
+
205
+ ### Mypy 1.19.1
206
+
207
+ - Fix noncommutative joins with bounded TypeVars (Shantanu, PR [20345](https://github.com/python/mypy/pull/20345))
208
+ - Respect output format for cached runs by serializing raw errors in cache metas (Ivan Levkivskyi, PR [20372](https://github.com/python/mypy/pull/20372))
209
+ - Allow `types.NoneType` in match cases (A5rocks, PR [20383](https://github.com/python/mypy/pull/20383))
210
+ - Fix mypyc generator regression with empty tuple (BobTheBuidler, PR [20371](https://github.com/python/mypy/pull/20371))
211
+ - Fix crash involving Unpack-ed TypeVarTuple (Shantanu, PR [20323](https://github.com/python/mypy/pull/20323))
212
+ - Fix crash on star import of redefinition (Ivan Levkivskyi, PR [20333](https://github.com/python/mypy/pull/20333))
213
+ - Fix crash on typevar with forward ref used in other module (Ivan Levkivskyi, PR [20334](https://github.com/python/mypy/pull/20334))
214
+ - Fail with an explicit error on PyPy (Ivan Levkivskyi, PR [20389](https://github.com/python/mypy/pull/20389))
215
+
216
+ ### Acknowledgements
217
+
218
+ Thanks to all mypy contributors who contributed to this release:
219
+ - A5rocks
220
+ - BobTheBuidler
221
+ - bzoracler
222
+ - Chainfire
223
+ - Christoph Tyralla
224
+ - David Foster
225
+ - Frank Dana
226
+ - Guo Ci
227
+ - iap
228
+ - Ivan Levkivskyi
229
+ - James Hilton-Balfe
230
+ - jhance
231
+ - Joren Hammudoglu
232
+ - Jukka Lehtosalo
233
+ - KarelKenens
234
+ - Kevin Kannammalil
235
+ - Marc Mueller
236
+ - Michael Carlstrom
237
+ - Michael J. Sullivan
238
+ - Piotr Sawicki
239
+ - Randolf Scholz
240
+ - Shantanu
241
+ - Sigve Sebastian Farstad
242
+ - sobolevn
243
+ - Stanislav Terliakov
244
+ - Stephen Morton
245
+ - Theodore Ando
246
+ - Thiago J. Barbalho
247
+ - wyattscarpenter
248
+
249
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
250
+
251
+ ## Mypy 1.18
252
+
253
+ We’ve just uploaded mypy 1.18.1 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
254
+ Mypy is a static type checker for Python. This release includes new features, performance
255
+ improvements and bug fixes. You can install it as follows:
256
+
257
+ python3 -m pip install -U mypy
258
+
259
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
260
+
261
+ ### Mypy Performance Improvements
262
+
263
+ Mypy 1.18.1 includes numerous performance improvements, resulting in about 40% speedup
264
+ compared to 1.17 when type checking mypy itself. In extreme cases, the improvement
265
+ can be 10x or higher. The list below is an overview of the various mypy optimizations.
266
+ Many mypyc improvements (discussed in a separate section below) also improve performance.
267
+
268
+ Type caching optimizations have a small risk of causing regressions. When
269
+ reporting issues with unexpected inferred types, please also check if
270
+ `--disable-expression-cache` will work around the issue, as it turns off some of
271
+ these optimizations.
272
+
273
+ - Improve self check performance by 1.8% (Jukka Lehtosalo, PR [19768](https://github.com/python/mypy/pull/19768), [19769](https://github.com/python/mypy/pull/19769), [19770](https://github.com/python/mypy/pull/19770))
274
+ - Optimize fixed-format deserialization (Ivan Levkivskyi, PR [19765](https://github.com/python/mypy/pull/19765))
275
+ - Use macros to optimize fixed-format deserialization (Ivan Levkivskyi, PR [19757](https://github.com/python/mypy/pull/19757))
276
+ - Two additional micro‑optimizations (Ivan Levkivskyi, PR [19627](https://github.com/python/mypy/pull/19627))
277
+ - Another set of micro‑optimizations (Ivan Levkivskyi, PR [19633](https://github.com/python/mypy/pull/19633))
278
+ - Cache common types (Ivan Levkivskyi, PR [19621](https://github.com/python/mypy/pull/19621))
279
+ - Skip more method bodies in third‑party libraries for speed (Ivan Levkivskyi, PR [19586](https://github.com/python/mypy/pull/19586))
280
+ - Simplify the representation of callable types (Ivan Levkivskyi, PR [19580](https://github.com/python/mypy/pull/19580))
281
+ - Add cache for types of some expressions (Ivan Levkivskyi, PR [19505](https://github.com/python/mypy/pull/19505))
282
+ - Use cache for dictionary expressions (Ivan Levkivskyi, PR [19536](https://github.com/python/mypy/pull/19536))
283
+ - Use cache for binary operations (Ivan Levkivskyi, PR [19523](https://github.com/python/mypy/pull/19523))
284
+ - Cache types of type objects (Ivan Levkivskyi, PR [19514](https://github.com/python/mypy/pull/19514))
285
+ - Avoid duplicate work when checking boolean operations (Ivan Levkivskyi, PR [19515](https://github.com/python/mypy/pull/19515))
286
+ - Optimize generic inference passes (Ivan Levkivskyi, PR [19501](https://github.com/python/mypy/pull/19501))
287
+ - Speed up the default plugin (Jukka Lehtosalo, PRs [19385](https://github.com/python/mypy/pull/19385) and [19462](https://github.com/python/mypy/pull/19462))
288
+ - Remove nested imports from the default plugin (Ivan Levkivskyi, PR [19388](https://github.com/python/mypy/pull/19388))
289
+ - Micro‑optimize type expansion (Jukka Lehtosalo, PR [19461](https://github.com/python/mypy/pull/19461))
290
+ - Micro‑optimize type indirection (Jukka Lehtosalo, PR [19460](https://github.com/python/mypy/pull/19460))
291
+ - Micro‑optimize the plugin framework (Jukka Lehtosalo, PR [19464](https://github.com/python/mypy/pull/19464))
292
+ - Avoid temporary set creation in subtype checking (Jukka Lehtosalo, PR [19463](https://github.com/python/mypy/pull/19463))
293
+ - Subtype checking micro‑optimization (Jukka Lehtosalo, PR [19384](https://github.com/python/mypy/pull/19384))
294
+ - Return early where possible in subtype check (Stanislav Terliakov, PR [19400](https://github.com/python/mypy/pull/19400))
295
+ - Deduplicate some types before joining (Stanislav Terliakov, PR [19409](https://github.com/python/mypy/pull/19409))
296
+ - Speed up type checking by caching argument inference context (Jukka Lehtosalo, PR [19323](https://github.com/python/mypy/pull/19323))
297
+ - Optimize binding method self argument type and deprecation checks (Ivan Levkivskyi, PR [19556](https://github.com/python/mypy/pull/19556))
298
+ - Keep trivial instance types/aliases during expansion (Ivan Levkivskyi, PR [19543](https://github.com/python/mypy/pull/19543))
299
+
300
+ ### Fixed‑Format Cache (Experimental)
301
+
302
+ Mypy now supports a new cache format used for faster incremental builds. It makes
303
+ incremental builds up to twice as fast. The feature is experimental and
304
+ currently only supported when using a compiled version of mypy. Use `--fixed-format-cache`
305
+ to enable the new format, or `fixed_format_cache = True` in a configuration file.
306
+
307
+ We plan to enable this by default in a future mypy release, and we'll eventually
308
+ deprecate and remove support for the original JSON-based format.
309
+
310
+ Unlike the JSON-based cache format, the new binary format is currently
311
+ not easy to parse and inspect by mypy users. We are planning to provide a tool to
312
+ convert fixed-format cache files to JSON, but details of the output JSON may be
313
+ different from the current JSON format. If you rely on being able to inspect
314
+ mypy cache files, we recommend creating a GitHub issue and explaining your use
315
+ case, so that we can more likely provide support for it. (Using
316
+ `MypyFile.read(binary_data)` to inspect cache data may be sufficient to support
317
+ some use cases.)
318
+
319
+ This feature was contributed by Ivan Levkivskyi (PR [19668](https://github.com/python/mypy/pull/19668), [19735](https://github.com/python/mypy/pull/19735), [19750](https://github.com/python/mypy/pull/19750), [19681](https://github.com/python/mypy/pull/19681), [19752](https://github.com/python/mypy/pull/19752), [19815](https://github.com/python/mypy/pull/19815)).
320
+
321
+ ### Flexible Variable Definitions: Update
322
+
323
+ Mypy 1.16.0 introduced `--allow-redefinition-new`, which allows redefining variables
324
+ with different types, and inferring union types for variables from multiple assignments.
325
+ The feature is now documented in the `--help` output, but the feature is still experimental.
326
+
327
+ We are planning to enable this by default in mypy 2.0, and we will also deprecate the
328
+ older `--allow-redefinition` flag. Since the new behavior differs significantly from
329
+ the older flag, we encourage users of `--allow-redefinition` to experiment with
330
+ `--allow-redefinition-new` and create a GitHub issue if the new functionality doesn't
331
+ support some important use cases.
332
+
333
+ This feature was contributed by Jukka Lehtosalo.
334
+
335
+ ### Inferred Type for Bare ClassVar
336
+
337
+ A ClassVar without an explicit type annotation now causes the type of the variable
338
+ to be inferred from the initializer:
339
+
340
+
341
+ ```python
342
+ from typing import ClassVar
343
+
344
+ class Item:
345
+ # Type of 'next_id' is now 'int' (it was 'Any')
346
+ next_id: ClassVar = 1
347
+
348
+ ...
349
+ ```
350
+
351
+ This feature was contributed by Ivan Levkivskyi (PR [19573](https://github.com/python/mypy/pull/19573)).
352
+
353
+ ### Disjoint Base Classes (@disjoint_base, PEP 800)
354
+
355
+ Mypy now understands disjoint bases (PEP 800): it recognizes the `@disjoint_base`
356
+ decorator, and rejects class definitions that combine mutually incompatible base classes,
357
+ and takes advantage of the fact that such classes cannot exist in reachability and
358
+ narrowing logic.
359
+
360
+ This class definition will now generate an error:
361
+
362
+ ```python
363
+ # Error: Class "Bad" has incompatible disjoint bases
364
+ class Bad(str, Exception):
365
+ ...
366
+ ```
367
+
368
+ This feature was contributed by Jelle Zijlstra (PR [19678](https://github.com/python/mypy/pull/19678)).
369
+
370
+ ### Miscellaneous New Mypy Features
371
+
372
+ - Add `--strict-equality-for-none` to flag non-overlapping comparisons involving None (Christoph Tyralla, PR [19718](https://github.com/python/mypy/pull/19718))
373
+ - Don’t show import‑related errors after a module‑level assert such as `assert sys.platform == "linux"` that is always false (Stanislav Terliakov, PR [19347](https://github.com/python/mypy/pull/19347))
374
+
375
+ ### Improvements to Match Statements
376
+
377
+ - Add temporary named expressions for match subjects (Stanislav Terliakov, PR [18446](https://github.com/python/mypy/pull/18446))
378
+ - Fix unwrapping of assignment expressions in match subject (Marc Mueller, PR [19742](https://github.com/python/mypy/pull/19742))
379
+ - Omit errors for class patterns against object (Marc Mueller, PR [19709](https://github.com/python/mypy/pull/19709))
380
+ - Remove unnecessary error for certain match class patterns (Marc Mueller, PR [19708](https://github.com/python/mypy/pull/19708))
381
+ - Use union type for captured vars in or pattern (Marc Mueller, PR [19710](https://github.com/python/mypy/pull/19710))
382
+ - Prevent final reassignment inside match case (Omer Hadari, PR [19496](https://github.com/python/mypy/pull/19496))
383
+
384
+ ### Fixes to Crashes
385
+
386
+ - Fix crash with variadic tuple arguments to a generic type (Randolf Scholz, PR [19705](https://github.com/python/mypy/pull/19705))
387
+ - Fix crash when enable_error_code in pyproject.toml has wrong type (wyattscarpenter, PR [19494](https://github.com/python/mypy/pull/19494))
388
+ - Prevent crash for dataclass with PEP 695 TypeVarTuple on Python 3.13+ (Stanislav Terliakov, PR [19565](https://github.com/python/mypy/pull/19565))
389
+ - Fix crash on settable property alias (Ivan Levkivskyi, PR [19615](https://github.com/python/mypy/pull/19615))
390
+
391
+ ### Experimental Free-threading Support for Mypyc
392
+
393
+ All mypyc tests now pass on free-threading Python 3.14 release candidate builds. The performance
394
+ of various micro-benchmarks scale well across multiple threads.
395
+
396
+ Free-threading support is still experimental. Note that native attribute access
397
+ (get and set), list item access and certain other operations are still
398
+ unsafe when there are race conditions. This will likely change in the future.
399
+ You can follow the
400
+ [area-free-threading label](https://github.com/mypyc/mypyc/issues?q=is%3Aissue%20state%3Aopen%20label%3Aarea-free-threading)
401
+ in the mypyc issues tracker to follow progress.
402
+
403
+ Related PRs:
404
+ - Enable free‑threading when compiling multiple modules (Jukka Lehtosalo, PR [19541](https://github.com/python/mypy/pull/19541))
405
+ - Fix `list.pop` on free‑threaded builds (Jukka Lehtosalo, PR [19522](https://github.com/python/mypy/pull/19522))
406
+ - Make type objects immortal under free‑threading (Jukka Lehtosalo, PR [19538](https://github.com/python/mypy/pull/19538))
407
+
408
+ ### Mypyc: Support `__new__`
409
+
410
+ Mypyc now has rudimentary support for user-defined `__new__` methods.
411
+
412
+ This feature was contributed by Piotr Sawicki (PR [19739](https://github.com/python/mypy/pull/19739)).
413
+
414
+ ### Mypyc: Faster Generators and Async Functions
415
+
416
+ Generators and calls of async functions are now faster, sometimes by 2x or more.
417
+
418
+ Related PRs:
419
+ - Speed up for loops over native generators (Jukka Lehtosalo, PR [19415](https://github.com/python/mypy/pull/19415))
420
+ - Speed up native‑to‑native calls using await (Jukka Lehtosalo, PR [19398](https://github.com/python/mypy/pull/19398))
421
+ - Call generator helper directly in await expressions (Jukka Lehtosalo, PR [19376](https://github.com/python/mypy/pull/19376))
422
+ - Speed up generator allocation with per‑type freelists (Jukka Lehtosalo, PR [19316](https://github.com/python/mypy/pull/19316))
423
+
424
+ ### Miscellaneous Mypyc Improvements
425
+
426
+ - Special‑case certain Enum method calls for speed (Ivan Levkivskyi, PR [19634](https://github.com/python/mypy/pull/19634))
427
+ - Fix issues related to subclassing and undefined attribute tracking (Chainfire, PR [19787](https://github.com/python/mypy/pull/19787))
428
+ - Fix invalid C function signature (Jukka Lehtosalo, PR [19773](https://github.com/python/mypy/pull/19773))
429
+ - Speed up implicit `__ne__` (Jukka Lehtosalo, PR [19759](https://github.com/python/mypy/pull/19759))
430
+ - Speed up equality with optional str/bytes types (Jukka Lehtosalo, PR [19758](https://github.com/python/mypy/pull/19758))
431
+ - Speed up access to empty tuples (BobTheBuidler, PR [19654](https://github.com/python/mypy/pull/19654))
432
+ - Speed up calls with `*args` (BobTheBuidler, PRs [19623](https://github.com/python/mypy/pull/19623) and [19631](https://github.com/python/mypy/pull/19631))
433
+ - Speed up calls with `**kwargs` (BobTheBuidler, PR [19630](https://github.com/python/mypy/pull/19630))
434
+ - Optimize `type(x)`, `x.__class__`, and `<type>.__name__` (Jukka Lehtosalo, PR [19691](https://github.com/python/mypy/pull/19691), [19683](https://github.com/python/mypy/pull/19683))
435
+ - Specialize `bytes.decode` for common encodings (Jukka Lehtosalo, PR [19688](https://github.com/python/mypy/pull/19688))
436
+ - Speed up `in` operations using final fixed‑length tuples (Jukka Lehtosalo, PR [19682](https://github.com/python/mypy/pull/19682))
437
+ - Optimize f‑string building from final values (BobTheBuidler, PR [19611](https://github.com/python/mypy/pull/19611))
438
+ - Add dictionary set item for exact dict instances (BobTheBuidler, PR [19657](https://github.com/python/mypy/pull/19657))
439
+ - Cache length when iterating over immutable types (BobTheBuidler, PR [19656](https://github.com/python/mypy/pull/19656))
440
+ - Fix name conflict related to attributes of generator classes (Piotr Sawicki, PR [19535](https://github.com/python/mypy/pull/19535))
441
+ - Fix segfault from heap type objects with a static docstring (Brian Schubert, PR [19636](https://github.com/python/mypy/pull/19636))
442
+ - Unwrap NewType to its base type for additional optimizations (BobTheBuidler, PR [19497](https://github.com/python/mypy/pull/19497))
443
+ - Generate an export table only for separate compilation (Jukka Lehtosalo, PR [19521](https://github.com/python/mypy/pull/19521))
444
+ - Speed up `isinstance` with built‑in types (Piotr Sawicki, PR [19435](https://github.com/python/mypy/pull/19435))
445
+ - Use native integers for some sequence indexing (Jukka Lehtosalo, PR [19426](https://github.com/python/mypy/pull/19426))
446
+ - Speed up `isinstance(obj, list)` (Piotr Sawicki, PR [19416](https://github.com/python/mypy/pull/19416))
447
+ - Report error on reserved method names (Piotr Sawicki, PR [19407](https://github.com/python/mypy/pull/19407))
448
+ - Speed up string equality (Jukka Lehtosalo, PR [19402](https://github.com/python/mypy/pull/19402))
449
+ - Raise `NameError` on undefined names (Piotr Sawicki, PR [19395](https://github.com/python/mypy/pull/19395))
450
+ - Use per‑type freelists for nested functions (Jukka Lehtosalo, PR [19390](https://github.com/python/mypy/pull/19390))
451
+ - Simplify comparison of tuple elements (Piotr Sawicki, PR [19396](https://github.com/python/mypy/pull/19396))
452
+ - Generate introspection signatures for compiled functions (Brian Schubert, PR [19307](https://github.com/python/mypy/pull/19307))
453
+ - Fix undefined attribute checking special case (Jukka Lehtosalo, PR [19378](https://github.com/python/mypy/pull/19378))
454
+ - Fix comparison of tuples with different lengths (Piotr Sawicki, PR [19372](https://github.com/python/mypy/pull/19372))
455
+ - Speed up `list.clear` (Jahongir Qurbonov, PR [19344](https://github.com/python/mypy/pull/19344))
456
+ - Speed up `weakref.proxy` (BobTheBuidler, PR [19217](https://github.com/python/mypy/pull/19217))
457
+ - Speed up `weakref.ref` (BobTheBuidler, PR [19099](https://github.com/python/mypy/pull/19099))
458
+ - Speed up `str.count` (BobTheBuidler, PR [19264](https://github.com/python/mypy/pull/19264))
459
+
460
+ ### Stubtest Improvements
461
+ - Add temporary `--ignore-disjoint-bases` flag to ease PEP 800 migration (Joren Hammudoglu, PR [19740](https://github.com/python/mypy/pull/19740))
462
+ - Flag redundant uses of `@disjoint_base` (Jelle Zijlstra, PR [19715](https://github.com/python/mypy/pull/19715))
463
+ - Improve signatures for `__init__` of C extension classes (Stephen Morton, PR [18259](https://github.com/python/mypy/pull/18259))
464
+ - Handle overloads with mixed positional‑only parameters (Stephen Morton, PR [18287](https://github.com/python/mypy/pull/18287))
465
+ - Use “parameter” (not “argument”) in error messages (PrinceNaroliya, PR [19707](https://github.com/python/mypy/pull/19707))
466
+ - Don’t require `@disjoint_base` when `__slots__` imply finality (Jelle Zijlstra, PR [19701](https://github.com/python/mypy/pull/19701))
467
+ - Allow runtime‑existing aliases of `@type_check_only` types (Brian Schubert, PR [19568](https://github.com/python/mypy/pull/19568))
468
+ - More detailed checking of type objects in stubtest (Stephen Morton, PR [18251](https://github.com/python/mypy/pull/18251))
469
+ - Support running stubtest in non-UTF8 terminals (Stanislav Terliakov, PR [19085](https://github.com/python/mypy/pull/19085))
470
+
471
+ ### Documentation Updates
472
+
473
+ - Add idlemypyextension to IDE integrations (CoolCat467, PR [18615](https://github.com/python/mypy/pull/18615))
474
+ - Document that `object` is often preferable to `Any` in APIs (wyattscarpenter, PR [19103](https://github.com/python/mypy/pull/19103))
475
+ - Include a detailed listing of flags enabled by `--strict` (wyattscarpenter, PR [19062](https://github.com/python/mypy/pull/19062))
476
+ - Update “common issues” (reveal_type/reveal_locals; note on orjson) (wyattscarpenter, PR [19059](https://github.com/python/mypy/pull/19059), [19058](https://github.com/python/mypy/pull/19058))
477
+
478
+ ### Other Notable Fixes and Improvements
479
+
480
+ - Remove deprecated `--new-type-inference` flag (the new algorithm has long been default) (Ivan Levkivskyi, PR [19570](https://github.com/python/mypy/pull/19570))
481
+ - Use empty context as a fallback for return expressions when outer context misleads inference (Ivan Levkivskyi, PR [19767](https://github.com/python/mypy/pull/19767))
482
+ - Fix forward references in type parameters of over‑parameterized PEP 695 aliases (Brian Schubert, PR [19725](https://github.com/python/mypy/pull/19725))
483
+ - Don’t expand PEP 695 aliases when checking node fullnames (Brian Schubert, PR [19699](https://github.com/python/mypy/pull/19699))
484
+ - Don’t use outer context for 'or' expression inference when LHS is Any (Stanislav Terliakov, PR [19748](https://github.com/python/mypy/pull/19748))
485
+ - Recognize buffer protocol special methods (Brian Schubert, PR [19581](https://github.com/python/mypy/pull/19581))
486
+ - Support attribute access on enum members correctly (Stanislav Terliakov, PR [19422](https://github.com/python/mypy/pull/19422))
487
+ - Check `__slots__` assignments on self types (Stanislav Terliakov, PR [19332](https://github.com/python/mypy/pull/19332))
488
+ - Move self‑argument checks after decorator application (Stanislav Terliakov, PR [19490](https://github.com/python/mypy/pull/19490))
489
+ - Infer empty list for `__slots__` and module `__all__` (Stanislav Terliakov, PR [19348](https://github.com/python/mypy/pull/19348))
490
+ - Use normalized tuples for fallback calculation (Stanislav Terliakov, PR [19111](https://github.com/python/mypy/pull/19111))
491
+ - Preserve literals when joining similar types (Stanislav Terliakov, PR [19279](https://github.com/python/mypy/pull/19279))
492
+ - Allow adjacent conditionally‑defined overloads (Stanislav Terliakov, PR [19042](https://github.com/python/mypy/pull/19042))
493
+ - Check property decorators more strictly (Stanislav Terliakov, PR [19313](https://github.com/python/mypy/pull/19313))
494
+ - Support properties with generic setters (Ivan Levkivskyi, PR [19298](https://github.com/python/mypy/pull/19298))
495
+ - Generalize class/static method and property alias support (Ivan Levkivskyi, PR [19297](https://github.com/python/mypy/pull/19297))
496
+ - Re‑widen custom properties after narrowing (Ivan Levkivskyi, PR [19296](https://github.com/python/mypy/pull/19296))
497
+ - Avoid erasing type objects when checking runtime cover (Shantanu, PR [19320](https://github.com/python/mypy/pull/19320))
498
+ - Include tuple fallback in constraints built from tuple types (Stanislav Terliakov, PR [19100](https://github.com/python/mypy/pull/19100))
499
+ - Somewhat better isinstance support on old‑style unions (Shantanu, PR [19714](https://github.com/python/mypy/pull/19714))
500
+ - Improve promotions inside unions (Christoph Tyralla, PR [19245](https://github.com/python/mypy/pull/19245))
501
+ - Treat uninhabited types as having all attributes (Ivan Levkivskyi, PR [19300](https://github.com/python/mypy/pull/19300))
502
+ - Improve metaclass conflict checks (Robsdedude, PR [17682](https://github.com/python/mypy/pull/17682))
503
+ - Fixes to metaclass resolution algorithm (Robsdedude, PR [17713](https://github.com/python/mypy/pull/17713))
504
+ - PEP 702 @deprecated: handle “combined” overloads (Christoph Tyralla, PR [19626](https://github.com/python/mypy/pull/19626))
505
+ - PEP 702 @deprecated: include overloads in snapshot descriptions (Christoph Tyralla, PR [19613](https://github.com/python/mypy/pull/19613))
506
+ - Ignore overload implementation when checking `__OP__` / `__rOP__` compatibility (Stanislav Terliakov, PR [18502](https://github.com/python/mypy/pull/18502))
507
+ - Support `_value_` as a fallback for ellipsis Enum members (Stanislav Terliakov, PR [19352](https://github.com/python/mypy/pull/19352))
508
+ - Sort arguments in TypedDict overlap messages (Marc Mueller, PR [19666](https://github.com/python/mypy/pull/19666))
509
+ - Fix handling of implicit return in lambda (Stanislav Terliakov, PR [19642](https://github.com/python/mypy/pull/19642))
510
+ - Improve behavior of uninhabited types (Stanislav Terliakov, PR [19648](https://github.com/python/mypy/pull/19648))
511
+ - Fix overload diagnostics when `*args` and `**kwargs` both match (Shantanu, PR [19614](https://github.com/python/mypy/pull/19614))
512
+ - Further fix overload diagnostics for `*args`/`**kwargs` (Shantanu, PR [19619](https://github.com/python/mypy/pull/19619))
513
+ - Show type variable name in "Cannot infer type argument" (Brian Schubert, PR [19290](https://github.com/python/mypy/pull/19290))
514
+ - Fail gracefully on unsupported template strings (PEP 750) (Brian Schubert, PR [19700](https://github.com/python/mypy/pull/19700))
515
+ - Revert colored argparse help for Python 3.14 (Marc Mueller, PR [19721](https://github.com/python/mypy/pull/19721))
516
+ - Update stubinfo for latest typeshed (Shantanu, PR [19771](https://github.com/python/mypy/pull/19771))
517
+ - Fix dict assignment when an incompatible same‑shape TypedDict exists (Stanislav Terliakov, PR [19592](https://github.com/python/mypy/pull/19592))
518
+ - Fix constructor type for subclasses of Any (Ivan Levkivskyi, PR [19295](https://github.com/python/mypy/pull/19295))
519
+ - Fix TypeGuard/TypeIs being forgotten in some cases (Brian Schubert, PR [19325](https://github.com/python/mypy/pull/19325))
520
+ - Fix TypeIs negative narrowing for unions of generics (Brian Schubert, PR [18193](https://github.com/python/mypy/pull/18193))
521
+ - dmypy suggest: Fix incorrect signature suggestion when a type matches a module name (Brian Schubert, PR [18937](https://github.com/python/mypy/pull/18937))
522
+ - dmypy suggest: Fix interaction with `__new__` (Stanislav Terliakov, PR [18966](https://github.com/python/mypy/pull/18966))
523
+ - dmypy suggest: Support Callable / callable Protocols in decorator unwrapping (Anthony Sottile, PR [19072](https://github.com/python/mypy/pull/19072))
524
+ - Fix missing error when redeclaring a type variable in a nested generic class (Brian Schubert, PR [18883](https://github.com/python/mypy/pull/18883))
525
+ - Fix for overloaded type object erasure (Shantanu, PR [19338](https://github.com/python/mypy/pull/19338))
526
+ - Fix TypeGuard with call on temporary object (Saul Shanabrook, PR [19577](https://github.com/python/mypy/pull/19577))
527
+
528
+ ### Typeshed Updates
529
+
530
+ Please see [git log](https://github.com/python/typeshed/commits/main?after=2480d7e7c74493a024eaf254c5d2c6f452c80ee2+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
531
+
532
+ ### Mypy 1.18.2
533
+
534
+ - Fix crash on recursive alias (Ivan Levkivskyi, PR [19845](https://github.com/python/mypy/pull/19845))
535
+ - Add additional guidance for stubtest errors when runtime is `object.__init__` (Stephen Morton, PR [19733](https://github.com/python/mypy/pull/19733))
536
+ - Fix handling of None values in f-string expressions in mypyc (BobTheBuidler, PR [19846](https://github.com/python/mypy/pull/19846))
537
+
538
+ ### Acknowledgements
539
+
540
+ Thanks to all mypy contributors who contributed to this release:
541
+
542
+ - Ali Hamdan
543
+ - Anthony Sottile
544
+ - BobTheBuidler
545
+ - Brian Schubert
546
+ - Chainfire
547
+ - Charlie Denton
548
+ - Christoph Tyralla
549
+ - CoolCat467
550
+ - Daniel Hnyk
551
+ - Emily
552
+ - Emma Smith
553
+ - Ethan Sarp
554
+ - Ivan Levkivskyi
555
+ - Jahongir Qurbonov
556
+ - Jelle Zijlstra
557
+ - Joren Hammudoglu
558
+ - Jukka Lehtosalo
559
+ - Marc Mueller
560
+ - Omer Hadari
561
+ - Piotr Sawicki
562
+ - PrinceNaroliya
563
+ - Randolf Scholz
564
+ - Robsdedude
565
+ - Saul Shanabrook
566
+ - Shantanu
567
+ - Stanislav Terliakov
568
+ - Stephen Morton
569
+ - wyattscarpenter
570
+
571
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
572
+
573
+ ## Mypy 1.17
574
+
575
+ We’ve just uploaded mypy 1.17 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
576
+ Mypy is a static type checker for Python. This release includes new features and bug fixes.
577
+ You can install it as follows:
578
+
579
+ python3 -m pip install -U mypy
580
+
581
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
582
+
583
+ ### Optionally Check That Match Is Exhaustive
584
+
585
+ Mypy can now optionally generate an error if a match statement does not
586
+ match exhaustively, without having to use `assert_never(...)`. Enable
587
+ this by using `--enable-error-code exhaustive-match`.
588
+
589
+ Example:
590
+
591
+ ```python
592
+ # mypy: enable-error-code=exhaustive-match
593
+
594
+ import enum
595
+
596
+ class Color(enum.Enum):
597
+ RED = 1
598
+ BLUE = 2
599
+
600
+ def show_color(val: Color) -> None:
601
+ # error: Unhandled case for values of type "Literal[Color.BLUE]"
602
+ match val:
603
+ case Color.RED:
604
+ print("red")
605
+ ```
606
+
607
+ This feature was contributed by Donal Burns (PR [19144](https://github.com/python/mypy/pull/19144)).
608
+
609
+ ### Further Improvements to Attribute Resolution
610
+
611
+ This release includes additional improvements to how attribute types
612
+ and kinds are resolved. These fix many bugs and overall improve consistency.
613
+
614
+ * Handle corner case: protocol/class variable/descriptor (Ivan Levkivskyi, PR [19277](https://github.com/python/mypy/pull/19277))
615
+ * Fix a few inconsistencies in protocol/type object interactions (Ivan Levkivskyi, PR [19267](https://github.com/python/mypy/pull/19267))
616
+ * Refactor/unify access to static attributes (Ivan Levkivskyi, PR [19254](https://github.com/python/mypy/pull/19254))
617
+ * Remove inconsistencies in operator handling (Ivan Levkivskyi, PR [19250](https://github.com/python/mypy/pull/19250))
618
+ * Make protocol subtyping more consistent (Ivan Levkivskyi, PR [18943](https://github.com/python/mypy/pull/18943))
619
+
620
+ ### Fixes to Nondeterministic Type Checking
621
+
622
+ Previous mypy versions could infer different types for certain expressions
623
+ across different runs (typically depending on which order certain types
624
+ were processed, and this order was nondeterministic). This release includes
625
+ fixes to several such issues.
626
+
627
+ * Fix nondeterministic type checking by making join with explicit Protocol and type promotion commute (Shantanu, PR [18402](https://github.com/python/mypy/pull/18402))
628
+ * Fix nondeterministic type checking caused by nonassociative of None joins (Shantanu, PR [19158](https://github.com/python/mypy/pull/19158))
629
+ * Fix nondeterministic type checking caused by nonassociativity of joins (Shantanu, PR [19147](https://github.com/python/mypy/pull/19147))
630
+ * Fix nondeterministic type checking by making join between `type` and TypeVar commute (Shantanu, PR [19149](https://github.com/python/mypy/pull/19149))
631
+
632
+ ### Remove Support for Targeting Python 3.8
633
+
634
+ Mypy now requires `--python-version 3.9` or greater. Support for targeting Python 3.8 is
635
+ fully removed now. Since 3.8 is an unsupported version, mypy will default to the oldest
636
+ supported version (currently 3.9) if you still try to target 3.8.
637
+
638
+ This change is necessary because typeshed stopped supporting Python 3.8 after it
639
+ reached its End of Life in October 2024.
640
+
641
+ Contributed by Marc Mueller
642
+ (PR [19157](https://github.com/python/mypy/pull/19157), PR [19162](https://github.com/python/mypy/pull/19162)).
643
+
644
+ ### Initial Support for Python 3.14
645
+
646
+ Mypy is now tested on 3.14 and mypyc works with 3.14.0b3 and later.
647
+ Binary wheels compiled with mypyc for mypy itself will be available for 3.14
648
+ some time after 3.14.0rc1 has been released.
649
+
650
+ Note that not all features are supported just yet.
651
+
652
+ Contributed by Marc Mueller (PR [19164](https://github.com/python/mypy/pull/19164))
653
+
654
+ ### Deprecated Flag: `--force-uppercase-builtins`
655
+
656
+ Mypy only supports Python 3.9+. The `--force-uppercase-builtins` flag is now
657
+ deprecated as unnecessary, and a no-op. It will be removed in a future version.
658
+
659
+ Contributed by Marc Mueller (PR [19176](https://github.com/python/mypy/pull/19176))
660
+
661
+ ### Mypyc: Improvements to Generators and Async Functions
662
+
663
+ This release includes both performance improvements and bug fixes related
664
+ to generators and async functions (these share many implementation details).
665
+
666
+ * Fix exception swallowing in async try/finally blocks with await (Chainfire, PR [19353](https://github.com/python/mypy/pull/19353))
667
+ * Fix AttributeError in async try/finally with mixed return paths (Chainfire, PR [19361](https://github.com/python/mypy/pull/19361))
668
+ * Make generated generator helper method internal (Jukka Lehtosalo, PR [19268](https://github.com/python/mypy/pull/19268))
669
+ * Free coroutine after await encounters StopIteration (Jukka Lehtosalo, PR [19231](https://github.com/python/mypy/pull/19231))
670
+ * Use non-tagged integer for generator label (Jukka Lehtosalo, PR [19218](https://github.com/python/mypy/pull/19218))
671
+ * Merge generator and environment classes in simple cases (Jukka Lehtosalo, PR [19207](https://github.com/python/mypy/pull/19207))
672
+
673
+ ### Mypyc: Partial, Unsafe Support for Free Threading
674
+
675
+ Mypyc has minimal, quite memory-unsafe support for the free threaded
676
+ builds of 3.14. It is also only lightly tested. Bug reports and experience
677
+ reports are welcome!
678
+
679
+ Here are some of the major limitations:
680
+ * Free threading only works when compiling a single module at a time.
681
+ * If there is concurrent access to an object while another thread is mutating the same
682
+ object, it's possible to encounter segfaults and memory corruption.
683
+ * There are no efficient native primitives for thread synthronization, though the
684
+ regular `threading` module can be used.
685
+ * Some workloads don't scale well to multiple threads for no clear reason.
686
+
687
+ Related PRs:
688
+
689
+ * Enable partial, unsafe support for free-threading (Jukka Lehtosalo, PR [19167](https://github.com/python/mypy/pull/19167))
690
+ * Fix incref/decref on free-threaded builds (Jukka Lehtosalo, PR [19127](https://github.com/python/mypy/pull/19127))
691
+
692
+ ### Other Mypyc Fixes and Improvements
693
+
694
+ * Derive .c file name from full module name if using multi_file (Jukka Lehtosalo, PR [19278](https://github.com/python/mypy/pull/19278))
695
+ * Support overriding the group name used in output files (Jukka Lehtosalo, PR [19272](https://github.com/python/mypy/pull/19272))
696
+ * Add note about using non-native class to subclass built-in types (Jukka Lehtosalo, PR [19236](https://github.com/python/mypy/pull/19236))
697
+ * Make some generated classes implicitly final (Jukka Lehtosalo, PR [19235](https://github.com/python/mypy/pull/19235))
698
+ * Don't simplify module prefixes if using separate compilation (Jukka Lehtosalo, PR [19206](https://github.com/python/mypy/pull/19206))
699
+
700
+ ### Stubgen Improvements
701
+
702
+ * Add import for `types` in `__exit__` method signature (Alexey Makridenko, PR [19120](https://github.com/python/mypy/pull/19120))
703
+ * Add support for including class and property docstrings (Chad Dombrova, PR [17964](https://github.com/python/mypy/pull/17964))
704
+ * Don't generate `Incomplete | None = None` argument annotation (Sebastian Rittau, PR [19097](https://github.com/python/mypy/pull/19097))
705
+ * Support several more constructs in stubgen's alias printer (Stanislav Terliakov, PR [18888](https://github.com/python/mypy/pull/18888))
706
+
707
+ ### Miscellaneous Fixes and Improvements
708
+
709
+ * Combine the revealed types of multiple iteration steps in a more robust manner (Christoph Tyralla, PR [19324](https://github.com/python/mypy/pull/19324))
710
+ * Improve the handling of "iteration dependent" errors and notes in finally clauses (Christoph Tyralla, PR [19270](https://github.com/python/mypy/pull/19270))
711
+ * Lessen dmypy suggest path limitations for Windows machines (CoolCat467, PR [19337](https://github.com/python/mypy/pull/19337))
712
+ * Fix type ignore comments erroneously marked as unused by dmypy (Charlie Denton, PR [15043](https://github.com/python/mypy/pull/15043))
713
+ * Fix misspelled `exhaustive-match` error code (johnthagen, PR [19276](https://github.com/python/mypy/pull/19276))
714
+ * Fix missing error context for unpacking assignment involving star expression (Brian Schubert, PR [19258](https://github.com/python/mypy/pull/19258))
715
+ * Fix and simplify error de-duplication (Ivan Levkivskyi, PR [19247](https://github.com/python/mypy/pull/19247))
716
+ * Disallow `ClassVar` in type aliases (Brian Schubert, PR [19263](https://github.com/python/mypy/pull/19263))
717
+ * Add script that prints list of compiled files when compiling mypy (Jukka Lehtosalo, PR [19260](https://github.com/python/mypy/pull/19260))
718
+ * Fix help message url for "None and Optional handling" section (Guy Wilson, PR [19252](https://github.com/python/mypy/pull/19252))
719
+ * Display fully qualified name of imported base classes in errors about incompatible overrides (Mikhail Golubev, PR [19115](https://github.com/python/mypy/pull/19115))
720
+ * Avoid false `unreachable`, `redundant-expr`, and `redundant-casts` warnings in loops more robustly and efficiently, and avoid multiple `revealed type` notes for the same line (Christoph Tyralla, PR [19118](https://github.com/python/mypy/pull/19118))
721
+ * Fix type extraction from `isinstance` checks (Stanislav Terliakov, PR [19223](https://github.com/python/mypy/pull/19223))
722
+ * Erase stray type variables in `functools.partial` (Stanislav Terliakov, PR [18954](https://github.com/python/mypy/pull/18954))
723
+ * Make inferring condition value recognize the whole truth table (Stanislav Terliakov, PR [18944](https://github.com/python/mypy/pull/18944))
724
+ * Support type aliases, `NamedTuple` and `TypedDict` in constrained TypeVar defaults (Stanislav Terliakov, PR [18884](https://github.com/python/mypy/pull/18884))
725
+ * Move dataclass `kw_only` fields to the end of the signature (Stanislav Terliakov, PR [19018](https://github.com/python/mypy/pull/19018))
726
+ * Provide a better fallback value for the `python_version` option (Marc Mueller, PR [19162](https://github.com/python/mypy/pull/19162))
727
+ * Avoid spurious non-overlapping equality error with metaclass with `__eq__` (Michael J. Sullivan, PR [19220](https://github.com/python/mypy/pull/19220))
728
+ * Narrow type variable bounds (Ivan Levkivskyi, PR [19183](https://github.com/python/mypy/pull/19183))
729
+ * Add classifier for Python 3.14 (Marc Mueller, PR [19199](https://github.com/python/mypy/pull/19199))
730
+ * Capitalize syntax error messages (Charulata, PR [19114](https://github.com/python/mypy/pull/19114))
731
+ * Infer constraints eagerly if actual is Any (Ivan Levkivskyi, PR [19190](https://github.com/python/mypy/pull/19190))
732
+ * Include walrus assignments in conditional inference (Stanislav Terliakov, PR [19038](https://github.com/python/mypy/pull/19038))
733
+ * Use PEP 604 syntax when converting types to strings (Marc Mueller, PR [19179](https://github.com/python/mypy/pull/19179))
734
+ * Use more lower-case builtin types in error messages (Marc Mueller, PR [19177](https://github.com/python/mypy/pull/19177))
735
+ * Fix example to use correct method of Stack (Łukasz Kwieciński, PR [19123](https://github.com/python/mypy/pull/19123))
736
+ * Forbid `.pop` of `Readonly` `NotRequired` TypedDict items (Stanislav Terliakov, PR [19133](https://github.com/python/mypy/pull/19133))
737
+ * Emit a friendlier warning on invalid exclude regex, instead of a stacktrace (wyattscarpenter, PR [19102](https://github.com/python/mypy/pull/19102))
738
+ * Enable ANSI color codes for dmypy client in Windows (wyattscarpenter, PR [19088](https://github.com/python/mypy/pull/19088))
739
+ * Extend special case for context-based type variable inference to unions in return position (Stanislav Terliakov, PR [18976](https://github.com/python/mypy/pull/18976))
740
+
741
+ ### Mypy 1.17.1
742
+ * Retain `None` as constraints bottom if no bottoms were provided (Stanislav Terliakov, PR [19485](https://github.com/python/mypy/pull/19485))
743
+ * Fix "ignored exception in `hasattr`" in dmypy (Stanislav Terliakov, PR [19428](https://github.com/python/mypy/pull/19428))
744
+ * Prevent a crash when InitVar is redefined with a method in a subclass (Stanislav Terliakov, PR [19453](https://github.com/python/mypy/pull/19453))
745
+
746
+ ### Acknowledgements
747
+
748
+ Thanks to all mypy contributors who contributed to this release:
749
+
750
+ * Alexey Makridenko
751
+ * Brian Schubert
752
+ * Chad Dombrova
753
+ * Chainfire
754
+ * Charlie Denton
755
+ * Charulata
756
+ * Christoph Tyralla
757
+ * CoolCat467
758
+ * Donal Burns
759
+ * Guy Wilson
760
+ * Ivan Levkivskyi
761
+ * johnthagen
762
+ * Jukka Lehtosalo
763
+ * Łukasz Kwieciński
764
+ * Marc Mueller
765
+ * Michael J. Sullivan
766
+ * Mikhail Golubev
767
+ * Sebastian Rittau
768
+ * Shantanu
769
+ * Stanislav Terliakov
770
+ * wyattscarpenter
771
+
772
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
773
+
774
+ ## Mypy 1.16
775
+
776
+ We’ve just uploaded mypy 1.16 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
777
+ Mypy is a static type checker for Python. This release includes new features and bug fixes.
778
+ You can install it as follows:
779
+
780
+ python3 -m pip install -U mypy
781
+
782
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
783
+
784
+ ### Different Property Getter and Setter Types
785
+
786
+ Mypy now supports using different types for a property getter and setter:
787
+
788
+ ```python
789
+ class A:
790
+ _value: int
791
+
792
+ @property
793
+ def foo(self) -> int:
794
+ return self._value
795
+
796
+ @foo.setter
797
+ def foo(self, x: str | int) -> None:
798
+ try:
799
+ self._value = int(x)
800
+ except ValueError:
801
+ raise Exception(f"'{x}' is not a valid value for 'foo'")
802
+ ```
803
+ This was contributed by Ivan Levkivskyi (PR [18510](https://github.com/python/mypy/pull/18510)).
804
+
805
+ ### Flexible Variable Redefinitions (Experimental)
806
+
807
+ Mypy now allows unannotated variables to be freely redefined with
808
+ different types when using the experimental `--allow-redefinition-new`
809
+ flag. You will also need to enable `--local-partial-types`. Mypy will
810
+ now infer a union type when different types are assigned to a
811
+ variable:
812
+
813
+ ```py
814
+ # mypy: allow-redefinition-new, local-partial-types
815
+
816
+ def f(n: int, b: bool) -> int | str:
817
+ if b:
818
+ x = n
819
+ else:
820
+ x = str(n)
821
+ # Type of 'x' is int | str here.
822
+ return x
823
+ ```
824
+
825
+ Without the new flag, mypy only supports inferring optional types (`X
826
+ | None`) from multiple assignments, but now mypy can infer arbitrary
827
+ union types.
828
+
829
+ An unannotated variable can now also have different types in different
830
+ code locations:
831
+
832
+ ```py
833
+ # mypy: allow-redefinition-new, local-partial-types
834
+ ...
835
+
836
+ if cond():
837
+ for x in range(n):
838
+ # Type of 'x' is 'int' here
839
+ ...
840
+ else:
841
+ for x in ['a', 'b']:
842
+ # Type of 'x' is 'str' here
843
+ ...
844
+ ```
845
+
846
+ We are planning to turn this flag on by default in mypy 2.0, along
847
+ with `--local-partial-types`. The feature is still experimental and
848
+ has known issues, and the semantics may still change in the
849
+ future. You may need to update or add type annotations when switching
850
+ to the new behavior, but if you encounter anything unexpected, please
851
+ create a GitHub issue.
852
+
853
+ This was contributed by Jukka Lehtosalo
854
+ (PR [18727](https://github.com/python/mypy/pull/18727), PR [19153](https://github.com/python/mypy/pull/19153)).
855
+
856
+ ### Stricter Type Checking with Imprecise Types
857
+
858
+ Mypy can now detect additional errors in code that uses `Any` types or has missing function annotations.
859
+
860
+ When calling `dict.get(x, None)` on an object of type `dict[str, Any]`, this
861
+ now results in an optional type (in the past it was `Any`):
862
+
863
+ ```python
864
+ def f(d: dict[str, Any]) -> int:
865
+ # Error: Return value has type "Any | None" but expected "int"
866
+ return d.get("x", None)
867
+ ```
868
+
869
+ Type narrowing using assignments can result in more precise types in
870
+ the presence of `Any` types:
871
+
872
+ ```python
873
+ def foo(): ...
874
+
875
+ def bar(n: int) -> None:
876
+ x = foo()
877
+ # Type of 'x' is 'Any' here
878
+ if n > 5:
879
+ x = str(n)
880
+ # Type of 'x' is 'str' here
881
+ ```
882
+
883
+ When using `--check-untyped-defs`, unannotated overrides are now
884
+ checked more strictly against superclass definitions.
885
+
886
+ Related PRs:
887
+
888
+ * Use union types instead of join in binder (Ivan Levkivskyi, PR [18538](https://github.com/python/mypy/pull/18538))
889
+ * Check superclass compatibility of untyped methods if `--check-untyped-defs` is set (Stanislav Terliakov, PR [18970](https://github.com/python/mypy/pull/18970))
890
+
891
+ ### Improvements to Attribute Resolution
892
+
893
+ This release includes several fixes to inconsistent resolution of attribute, method and descriptor types.
894
+
895
+ * Consolidate descriptor handling (Ivan Levkivskyi, PR [18831](https://github.com/python/mypy/pull/18831))
896
+ * Make multiple inheritance checking use common semantics (Ivan Levkivskyi, PR [18876](https://github.com/python/mypy/pull/18876))
897
+ * Make method override checking use common semantics (Ivan Levkivskyi, PR [18870](https://github.com/python/mypy/pull/18870))
898
+ * Fix descriptor overload selection (Ivan Levkivskyi, PR [18868](https://github.com/python/mypy/pull/18868))
899
+ * Handle union types when binding `self` (Ivan Levkivskyi, PR [18867](https://github.com/python/mypy/pull/18867))
900
+ * Make variable override checking use common semantics (Ivan Levkivskyi, PR [18847](https://github.com/python/mypy/pull/18847))
901
+ * Make descriptor handling behave consistently (Ivan Levkivskyi, PR [18831](https://github.com/python/mypy/pull/18831))
902
+
903
+ ### Make Implementation for Abstract Overloads Optional
904
+
905
+ The implementation can now be omitted for abstract overloaded methods,
906
+ even outside stubs:
907
+
908
+ ```py
909
+ from abc import abstractmethod
910
+ from typing import overload
911
+
912
+ class C:
913
+ @abstractmethod
914
+ @overload
915
+ def foo(self, x: int) -> int: ...
916
+
917
+ @abstractmethod
918
+ @overload
919
+ def foo(self, x: str) -> str: ...
920
+
921
+ # No implementation required for "foo"
922
+ ```
923
+
924
+ This was contributed by Ivan Levkivskyi (PR [18882](https://github.com/python/mypy/pull/18882)).
925
+
926
+ ### Option to Exclude Everything in .gitignore
927
+
928
+ You can now use `--exclude-gitignore` to exclude everything in a
929
+ `.gitignore` file from the mypy build. This behaves similar to
930
+ excluding the paths using `--exclude`. We might enable this by default
931
+ in a future mypy release.
932
+
933
+ This was contributed by Ivan Levkivskyi (PR [18696](https://github.com/python/mypy/pull/18696)).
934
+
935
+ ### Selectively Disable Deprecated Warnings
936
+
937
+ It's now possible to selectively disable warnings generated from
938
+ [`warnings.deprecated`](https://docs.python.org/3/library/warnings.html#warnings.deprecated)
939
+ using the [`--deprecated-calls-exclude`](https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-deprecated-calls-exclude)
940
+ option:
941
+
942
+ ```python
943
+ # mypy --enable-error-code deprecated
944
+ # --deprecated-calls-exclude=foo.A
945
+ import foo
946
+
947
+ foo.A().func() # OK, the deprecated warning is ignored
948
+ ```
949
+
950
+ ```python
951
+ # file foo.py
952
+
953
+ from typing_extensions import deprecated
954
+
955
+ class A:
956
+ @deprecated("Use A.func2 instead")
957
+ def func(self): pass
958
+
959
+ ...
960
+ ```
961
+
962
+ Contributed by Marc Mueller (PR [18641](https://github.com/python/mypy/pull/18641))
963
+
964
+ ### Annotating Native/Non-Native Classes in Mypyc
965
+
966
+ You can now declare a class as a non-native class when compiling with
967
+ mypyc. Unlike native classes, which are extension classes and have an
968
+ immutable structure, non-native classes are normal Python classes at
969
+ runtime and are fully dynamic. Example:
970
+
971
+ ```python
972
+ from mypy_extensions import mypyc_attr
973
+
974
+ @mypyc_attr(native_class=False)
975
+ class NonNativeClass:
976
+ ...
977
+
978
+ o = NonNativeClass()
979
+
980
+ # Ok, even if attribute "foo" not declared in class body
981
+ setattr(o, "foo", 1)
982
+ ```
983
+
984
+ Classes are native by default in compiled modules, but classes that
985
+ use certain features (such as most metaclasses) are implicitly
986
+ non-native.
987
+
988
+ You can also explicitly declare a class as native. In this case mypyc
989
+ will generate an error if it can't compile the class as a native
990
+ class, instead of falling back to a non-native class:
991
+
992
+ ```python
993
+ from mypy_extensions import mypyc_attr
994
+ from foo import MyMeta
995
+
996
+ # Error: Unsupported metaclass for a native class
997
+ @mypyc_attr(native_class=True)
998
+ class C(metaclass=MyMeta):
999
+ ...
1000
+ ```
1001
+
1002
+ Since native classes are significantly more efficient that non-native
1003
+ classes, you may want to ensure that certain classes always compiled
1004
+ as native classes.
1005
+
1006
+ This feature was contributed by Valentin Stanciu (PR [18802](https://github.com/python/mypy/pull/18802)).
1007
+
1008
+ ### Mypyc Fixes and Improvements
1009
+
1010
+ * Improve documentation of native and non-native classes (Jukka Lehtosalo, PR [19154](https://github.com/python/mypy/pull/19154))
1011
+ * Fix compilation when using Python 3.13 debug build (Valentin Stanciu, PR [19045](https://github.com/python/mypy/pull/19045))
1012
+ * Show the reason why a class can't be a native class (Valentin Stanciu, PR [19016](https://github.com/python/mypy/pull/19016))
1013
+ * Support await/yield while temporary values are live (Michael J. Sullivan, PR [16305](https://github.com/python/mypy/pull/16305))
1014
+ * Fix spilling values with overlapping error values (Jukka Lehtosalo, PR [18961](https://github.com/python/mypy/pull/18961))
1015
+ * Fix reference count of spilled register in async def (Jukka Lehtosalo, PR [18957](https://github.com/python/mypy/pull/18957))
1016
+ * Add basic optimization for `sorted` (Marc Mueller, PR [18902](https://github.com/python/mypy/pull/18902))
1017
+ * Fix access of class object in a type annotation (Advait Dixit, PR [18874](https://github.com/python/mypy/pull/18874))
1018
+ * Optimize `list.__imul__` and `tuple.__mul__ `(Marc Mueller, PR [18887](https://github.com/python/mypy/pull/18887))
1019
+ * Optimize `list.__add__`, `list.__iadd__` and `tuple.__add__` (Marc Mueller, PR [18845](https://github.com/python/mypy/pull/18845))
1020
+ * Add and implement primitive `list.copy()` (exertustfm, PR [18771](https://github.com/python/mypy/pull/18771))
1021
+ * Optimize `builtins.repr` (Marc Mueller, PR [18844](https://github.com/python/mypy/pull/18844))
1022
+ * Support iterating over keys/values/items of dict-bound TypeVar and ParamSpec.kwargs (Stanislav Terliakov, PR [18789](https://github.com/python/mypy/pull/18789))
1023
+ * Add efficient primitives for `str.strip()` etc. (Advait Dixit, PR [18742](https://github.com/python/mypy/pull/18742))
1024
+ * Document that `strip()` etc. are optimized (Jukka Lehtosalo, PR [18793](https://github.com/python/mypy/pull/18793))
1025
+ * Fix mypyc crash with enum type aliases (Valentin Stanciu, PR [18725](https://github.com/python/mypy/pull/18725))
1026
+ * Optimize `str.find` and `str.rfind` (Marc Mueller, PR [18709](https://github.com/python/mypy/pull/18709))
1027
+ * Optimize `str.__contains__` (Marc Mueller, PR [18705](https://github.com/python/mypy/pull/18705))
1028
+ * Fix order of steal/unborrow in tuple unpacking (Ivan Levkivskyi, PR [18732](https://github.com/python/mypy/pull/18732))
1029
+ * Optimize `str.partition` and `str.rpartition` (Marc Mueller, PR [18702](https://github.com/python/mypy/pull/18702))
1030
+ * Optimize `str.startswith` and `str.endswith` with tuple argument (Marc Mueller, PR [18678](https://github.com/python/mypy/pull/18678))
1031
+ * Improve `str.startswith` and `str.endswith` with tuple argument (Marc Mueller, PR [18703](https://github.com/python/mypy/pull/18703))
1032
+ * `pythoncapi_compat`: don't define Py_NULL if it is already defined (Michael R. Crusoe, PR [18699](https://github.com/python/mypy/pull/18699))
1033
+ * Optimize `str.splitlines` (Marc Mueller, PR [18677](https://github.com/python/mypy/pull/18677))
1034
+ * Mark `dict.setdefault` as optimized (Marc Mueller, PR [18685](https://github.com/python/mypy/pull/18685))
1035
+ * Support `__del__` methods (Advait Dixit, PR [18519](https://github.com/python/mypy/pull/18519))
1036
+ * Optimize `str.rsplit` (Marc Mueller, PR [18673](https://github.com/python/mypy/pull/18673))
1037
+ * Optimize `str.removeprefix` and `str.removesuffix` (Marc Mueller, PR [18672](https://github.com/python/mypy/pull/18672))
1038
+ * Recognize literal types in `__match_args__` (Stanislav Terliakov, PR [18636](https://github.com/python/mypy/pull/18636))
1039
+ * Fix non extension classes with attribute annotations using forward references (Valentin Stanciu, PR [18577](https://github.com/python/mypy/pull/18577))
1040
+ * Use lower-case generic types such as `list[t]` in documentation (Jukka Lehtosalo, PR [18576](https://github.com/python/mypy/pull/18576))
1041
+ * Improve support for `frozenset` (Marc Mueller, PR [18571](https://github.com/python/mypy/pull/18571))
1042
+ * Fix wheel build for cp313-win (Marc Mueller, PR [18560](https://github.com/python/mypy/pull/18560))
1043
+ * Reduce impact of immortality (introduced in Python 3.12) on reference counting performance (Jukka Lehtosalo, PR [18459](https://github.com/python/mypy/pull/18459))
1044
+ * Update math error messages for 3.14 (Marc Mueller, PR [18534](https://github.com/python/mypy/pull/18534))
1045
+ * Update math error messages for 3.14 (2) (Marc Mueller, PR [18949](https://github.com/python/mypy/pull/18949))
1046
+ * Replace deprecated `_PyLong_new` with `PyLongWriter` API (Marc Mueller, PR [18532](https://github.com/python/mypy/pull/18532))
1047
+
1048
+ ### Fixes to Crashes
1049
+
1050
+ * Traverse module ancestors when traversing reachable graph nodes during dmypy update (Stanislav Terliakov, PR [18906](https://github.com/python/mypy/pull/18906))
1051
+ * Fix crash on multiple unpacks in a bare type application (Stanislav Terliakov, PR [18857](https://github.com/python/mypy/pull/18857))
1052
+ * Prevent crash when enum/TypedDict call is stored as a class attribute (Stanislav Terliakov, PR [18861](https://github.com/python/mypy/pull/18861))
1053
+ * Fix crash on multiple unpacks in a bare type application (Stanislav Terliakov, PR [18857](https://github.com/python/mypy/pull/18857))
1054
+ * Fix crash on type inference against non-normal callables (Ivan Levkivskyi, PR [18858](https://github.com/python/mypy/pull/18858))
1055
+ * Fix crash on decorated getter in settable property (Ivan Levkivskyi, PR [18787](https://github.com/python/mypy/pull/18787))
1056
+ * Fix crash on callable with `*args` and suffix against Any (Ivan Levkivskyi, PR [18781](https://github.com/python/mypy/pull/18781))
1057
+ * Fix crash on deferred supertype and setter override (Ivan Levkivskyi, PR [18649](https://github.com/python/mypy/pull/18649))
1058
+ * Fix crashes on incorrectly detected recursive aliases (Ivan Levkivskyi, PR [18625](https://github.com/python/mypy/pull/18625))
1059
+ * Report that `NamedTuple` and `dataclass` are incompatile instead of crashing (Christoph Tyralla, PR [18633](https://github.com/python/mypy/pull/18633))
1060
+ * Fix mypy daemon crash (Valentin Stanciu, PR [19087](https://github.com/python/mypy/pull/19087))
1061
+
1062
+ ### Performance Improvements
1063
+
1064
+ These are specific to mypy. Mypyc-related performance improvements are discussed elsewhere.
1065
+
1066
+ * Speed up binding `self` in trivial cases (Ivan Levkivskyi, PR [19024](https://github.com/python/mypy/pull/19024))
1067
+ * Small constraint solver optimization (Aaron Gokaslan, PR [18688](https://github.com/python/mypy/pull/18688))
1068
+
1069
+ ### Documentation Updates
1070
+
1071
+ * Improve documentation of `--strict` (lenayoung8, PR [18903](https://github.com/python/mypy/pull/18903))
1072
+ * Remove a note about `from __future__ import annotations` (Ageev Maxim, PR [18915](https://github.com/python/mypy/pull/18915))
1073
+ * Improve documentation on type narrowing (Tim Hoffmann, PR [18767](https://github.com/python/mypy/pull/18767))
1074
+ * Fix metaclass usage example (Georg, PR [18686](https://github.com/python/mypy/pull/18686))
1075
+ * Update documentation on `extra_checks` flag (Ivan Levkivskyi, PR [18537](https://github.com/python/mypy/pull/18537))
1076
+
1077
+ ### Stubgen Improvements
1078
+
1079
+ * Fix `TypeAlias` handling (Alexey Makridenko, PR [18960](https://github.com/python/mypy/pull/18960))
1080
+ * Handle `arg=None` in C extension modules (Anthony Sottile, PR [18768](https://github.com/python/mypy/pull/18768))
1081
+ * Fix valid type detection to allow pipe unions (Chad Dombrova, PR [18726](https://github.com/python/mypy/pull/18726))
1082
+ * Include simple decorators in stub files (Marc Mueller, PR [18489](https://github.com/python/mypy/pull/18489))
1083
+ * Support positional and keyword-only arguments in stubdoc (Paul Ganssle, PR [18762](https://github.com/python/mypy/pull/18762))
1084
+ * Fall back to `Incomplete` if we are unable to determine the module name (Stanislav Terliakov, PR [19084](https://github.com/python/mypy/pull/19084))
1085
+
1086
+ ### Stubtest Improvements
1087
+
1088
+ * Make stubtest ignore `__slotnames__` (Nick Pope, PR [19077](https://github.com/python/mypy/pull/19077))
1089
+ * Fix stubtest tests on 3.14 (Jelle Zijlstra, PR [19074](https://github.com/python/mypy/pull/19074))
1090
+ * Support for `strict_bytes` in stubtest (Joren Hammudoglu, PR [19002](https://github.com/python/mypy/pull/19002))
1091
+ * Understand override (Shantanu, PR [18815](https://github.com/python/mypy/pull/18815))
1092
+ * Better checking of runtime arguments with dunder names (Shantanu, PR [18756](https://github.com/python/mypy/pull/18756))
1093
+ * Ignore setattr and delattr inherited from object (Stephen Morton, PR [18325](https://github.com/python/mypy/pull/18325))
1094
+
1095
+ ### Miscellaneous Fixes and Improvements
1096
+
1097
+ * Add `--strict-bytes` to `--strict` (wyattscarpenter, PR [19049](https://github.com/python/mypy/pull/19049))
1098
+ * Admit that Final variables are never redefined (Stanislav Terliakov, PR [19083](https://github.com/python/mypy/pull/19083))
1099
+ * Add special support for `@django.cached_property` needed in `django-stubs` (sobolevn, PR [18959](https://github.com/python/mypy/pull/18959))
1100
+ * Do not narrow types to `Never` with binder (Ivan Levkivskyi, PR [18972](https://github.com/python/mypy/pull/18972))
1101
+ * Local forward references should precede global forward references (Ivan Levkivskyi, PR [19000](https://github.com/python/mypy/pull/19000))
1102
+ * Do not cache module lookup results in incremental mode that may become invalid (Stanislav Terliakov, PR [19044](https://github.com/python/mypy/pull/19044))
1103
+ * Only consider meta variables in ambiguous "any of" constraints (Stanislav Terliakov, PR [18986](https://github.com/python/mypy/pull/18986))
1104
+ * Allow accessing `__init__` on final classes and when `__init__` is final (Stanislav Terliakov, PR [19035](https://github.com/python/mypy/pull/19035))
1105
+ * Treat varargs as positional-only (A5rocks, PR [19022](https://github.com/python/mypy/pull/19022))
1106
+ * Enable colored output for argparse help in Python 3.14 (Marc Mueller, PR [19021](https://github.com/python/mypy/pull/19021))
1107
+ * Fix argparse for Python 3.14 (Marc Mueller, PR [19020](https://github.com/python/mypy/pull/19020))
1108
+ * `dmypy suggest` can now suggest through contextmanager-based decorators (Anthony Sottile, PR [18948](https://github.com/python/mypy/pull/18948))
1109
+ * Fix `__r<magic_methods>__` being used under the same `__<magic_method>__` hook (Arnav Jain, PR [18995](https://github.com/python/mypy/pull/18995))
1110
+ * Prioritize `.pyi` from `-stubs` packages over bundled `.pyi` (Joren Hammudoglu, PR [19001](https://github.com/python/mypy/pull/19001))
1111
+ * Fix missing subtype check case for `type[T]` (Stanislav Terliakov, PR [18975](https://github.com/python/mypy/pull/18975))
1112
+ * Fixes to the detection of redundant casts (Anthony Sottile, PR [18588](https://github.com/python/mypy/pull/18588))
1113
+ * Make some parse errors non-blocking (Shantanu, PR [18941](https://github.com/python/mypy/pull/18941))
1114
+ * Fix PEP 695 type alias with a mix of type arguments (PEP 696) (Marc Mueller, PR [18919](https://github.com/python/mypy/pull/18919))
1115
+ * Allow deeper recursion in mypy daemon, better error reporting (Carter Dodd, PR [17707](https://github.com/python/mypy/pull/17707))
1116
+ * Fix swapped errors for frozen/non-frozen dataclass inheritance (Nazrawi Demeke, PR [18918](https://github.com/python/mypy/pull/18918))
1117
+ * Fix incremental issue with namespace packages (Shantanu, PR [18907](https://github.com/python/mypy/pull/18907))
1118
+ * Exclude irrelevant members when narrowing union overlapping with enum (Stanislav Terliakov, PR [18897](https://github.com/python/mypy/pull/18897))
1119
+ * Flatten union before contracting literals when checking subtyping (Stanislav Terliakov, PR [18898](https://github.com/python/mypy/pull/18898))
1120
+ * Do not add `kw_only` dataclass fields to `__match_args__` (sobolevn, PR [18892](https://github.com/python/mypy/pull/18892))
1121
+ * Fix error message when returning long tuple with type mismatch (Thomas Mattone, PR [18881](https://github.com/python/mypy/pull/18881))
1122
+ * Treat `TypedDict` (old-style) aliases as regular `TypedDict`s (Stanislav Terliakov, PR [18852](https://github.com/python/mypy/pull/18852))
1123
+ * Warn about unused `type: ignore` comments when error code is disabled (Brian Schubert, PR [18849](https://github.com/python/mypy/pull/18849))
1124
+ * Reject duplicate `ParamSpec.{args,kwargs}` at call site (Stanislav Terliakov, PR [18854](https://github.com/python/mypy/pull/18854))
1125
+ * Make detection of enum members more consistent (sobolevn, PR [18675](https://github.com/python/mypy/pull/18675))
1126
+ * Admit that `**kwargs` mapping subtypes may have no direct type parameters (Stanislav Terliakov, PR [18850](https://github.com/python/mypy/pull/18850))
1127
+ * Don't suggest `types-setuptools` for `pkg_resources` (Shantanu, PR [18840](https://github.com/python/mypy/pull/18840))
1128
+ * Suggest `scipy-stubs` for `scipy` as non-typeshed stub package (Joren Hammudoglu, PR [18832](https://github.com/python/mypy/pull/18832))
1129
+ * Narrow tagged unions in match statements (Gene Parmesan Thomas, PR [18791](https://github.com/python/mypy/pull/18791))
1130
+ * Consistently store settable property type (Ivan Levkivskyi, PR [18774](https://github.com/python/mypy/pull/18774))
1131
+ * Do not blindly undefer on leaving function (Ivan Levkivskyi, PR [18674](https://github.com/python/mypy/pull/18674))
1132
+ * Process superclass methods before subclass methods in semanal (Ivan Levkivskyi, PR [18723](https://github.com/python/mypy/pull/18723))
1133
+ * Only defer top-level functions (Ivan Levkivskyi, PR [18718](https://github.com/python/mypy/pull/18718))
1134
+ * Add one more type-checking pass (Ivan Levkivskyi, PR [18717](https://github.com/python/mypy/pull/18717))
1135
+ * Properly account for `member` and `nonmember` in enums (sobolevn, PR [18559](https://github.com/python/mypy/pull/18559))
1136
+ * Fix instance vs tuple subtyping edge case (Ivan Levkivskyi, PR [18664](https://github.com/python/mypy/pull/18664))
1137
+ * Improve handling of Any/object in variadic generics (Ivan Levkivskyi, PR [18643](https://github.com/python/mypy/pull/18643))
1138
+ * Fix handling of named tuples in class match pattern (Ivan Levkivskyi, PR [18663](https://github.com/python/mypy/pull/18663))
1139
+ * Fix regression for user config files (Shantanu, PR [18656](https://github.com/python/mypy/pull/18656))
1140
+ * Fix dmypy socket issue on GNU/Hurd (Mattias Ellert, PR [18630](https://github.com/python/mypy/pull/18630))
1141
+ * Don't assume that for loop body index variable is always set (Jukka Lehtosalo, PR [18631](https://github.com/python/mypy/pull/18631))
1142
+ * Fix overlap check for variadic generics (Ivan Levkivskyi, PR [18638](https://github.com/python/mypy/pull/18638))
1143
+ * Improve support for `functools.partial` of overloaded callable protocol (Shantanu, PR [18639](https://github.com/python/mypy/pull/18639))
1144
+ * Allow lambdas in `except*` clauses (Stanislav Terliakov, PR [18620](https://github.com/python/mypy/pull/18620))
1145
+ * Fix trailing commas in many multiline string options in `pyproject.toml` (sobolevn, PR [18624](https://github.com/python/mypy/pull/18624))
1146
+ * Allow trailing commas for `files` setting in `mypy.ini` and `setup.ini` (sobolevn, PR [18621](https://github.com/python/mypy/pull/18621))
1147
+ * Fix "not callable" issue for `@dataclass(frozen=True)` with `Final` attr (sobolevn, PR [18572](https://github.com/python/mypy/pull/18572))
1148
+ * Add missing TypedDict special case when checking member access (Stanislav Terliakov, PR [18604](https://github.com/python/mypy/pull/18604))
1149
+ * Use lower case `list` and `dict` in invariance notes (Jukka Lehtosalo, PR [18594](https://github.com/python/mypy/pull/18594))
1150
+ * Fix inference when class and instance match protocol (Ivan Levkivskyi, PR [18587](https://github.com/python/mypy/pull/18587))
1151
+ * Remove support for `builtins.Any` (Marc Mueller, PR [18578](https://github.com/python/mypy/pull/18578))
1152
+ * Update the overlapping check for tuples to account for NamedTuples (A5rocks, PR [18564](https://github.com/python/mypy/pull/18564))
1153
+ * Fix `@deprecated` (PEP 702) with normal overloaded methods (Christoph Tyralla, PR [18477](https://github.com/python/mypy/pull/18477))
1154
+ * Start propagating end columns/lines for `type-arg` errors (A5rocks, PR [18533](https://github.com/python/mypy/pull/18533))
1155
+ * Improve handling of `type(x) is Foo` checks (Stanislav Terliakov, PR [18486](https://github.com/python/mypy/pull/18486))
1156
+ * Suggest `typing.Literal` for exit-return error messages (Marc Mueller, PR [18541](https://github.com/python/mypy/pull/18541))
1157
+ * Allow redefinitions in except/else/finally (Stanislav Terliakov, PR [18515](https://github.com/python/mypy/pull/18515))
1158
+ * Disallow setting Python version using inline config (Shantanu, PR [18497](https://github.com/python/mypy/pull/18497))
1159
+ * Improve type inference in tuple multiplication plugin (Shantanu, PR [18521](https://github.com/python/mypy/pull/18521))
1160
+ * Add missing line number to `yield from` with wrong type (Stanislav Terliakov, PR [18518](https://github.com/python/mypy/pull/18518))
1161
+ * Hint at argument names when formatting callables with compatible return types in error messages (Stanislav Terliakov, PR [18495](https://github.com/python/mypy/pull/18495))
1162
+ * Add better naming and improve compatibility for ad hoc intersections of instances (Christoph Tyralla, PR [18506](https://github.com/python/mypy/pull/18506))
1163
+
1164
+ ### Acknowledgements
1165
+
1166
+ Thanks to all mypy contributors who contributed to this release:
1167
+
1168
+ - A5rocks
1169
+ - Aaron Gokaslan
1170
+ - Advait Dixit
1171
+ - Ageev Maxim
1172
+ - Alexey Makridenko
1173
+ - Ali Hamdan
1174
+ - Anthony Sottile
1175
+ - Arnav Jain
1176
+ - Brian Schubert
1177
+ - bzoracler
1178
+ - Carter Dodd
1179
+ - Chad Dombrova
1180
+ - Christoph Tyralla
1181
+ - Dimitri Papadopoulos Orfanos
1182
+ - Emma Smith
1183
+ - exertustfm
1184
+ - Gene Parmesan Thomas
1185
+ - Georg
1186
+ - Ivan Levkivskyi
1187
+ - Jared Hance
1188
+ - Jelle Zijlstra
1189
+ - Joren Hammudoglu
1190
+ - lenayoung8
1191
+ - Marc Mueller
1192
+ - Mattias Ellert
1193
+ - Michael J. Sullivan
1194
+ - Michael R. Crusoe
1195
+ - Nazrawi Demeke
1196
+ - Nick Pope
1197
+ - Paul Ganssle
1198
+ - Shantanu
1199
+ - sobolevn
1200
+ - Stanislav Terliakov
1201
+ - Stephen Morton
1202
+ - Thomas Mattone
1203
+ - Tim Hoffmann
1204
+ - Tim Ruffing
1205
+ - Valentin Stanciu
1206
+ - Wesley Collin Wright
1207
+ - wyattscarpenter
1208
+
1209
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
1210
+
1211
+ ## Mypy 1.15
1212
+
1213
+ We’ve just uploaded mypy 1.15 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
1214
+ Mypy is a static type checker for Python. This release includes new features, performance
1215
+ improvements and bug fixes. You can install it as follows:
1216
+
1217
+ python3 -m pip install -U mypy
1218
+
1219
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
1220
+
1221
+ ### Performance Improvements
1222
+
1223
+ Mypy is up to 40% faster in some use cases. This improvement comes largely from tuning the performance
1224
+ of the garbage collector. Additionally, the release includes several micro-optimizations that may
1225
+ be impactful for large projects.
1226
+
1227
+ Contributed by Jukka Lehtosalo
1228
+ - PR [18306](https://github.com/python/mypy/pull/18306)
1229
+ - PR [18302](https://github.com/python/mypy/pull/18302)
1230
+ - PR [18298](https://github.com/python/mypy/pull/18298)
1231
+ - PR [18299](https://github.com/python/mypy/pull/18299)
1232
+
1233
+ ### Mypyc Accelerated Mypy Wheels for ARM Linux
1234
+
1235
+ For best performance, mypy can be compiled to C extension modules using mypyc. This makes
1236
+ mypy 3-5x faster than when interpreted with pure Python. We now build and upload mypyc
1237
+ accelerated mypy wheels for `manylinux_aarch64` to PyPI, making it easy for Linux users on
1238
+ ARM platforms to realise this speedup -- just `pip install` the latest mypy.
1239
+
1240
+ Contributed by Christian Bundy and Marc Mueller
1241
+ (PR [mypy_mypyc-wheels#76](https://github.com/mypyc/mypy_mypyc-wheels/pull/76),
1242
+ PR [mypy_mypyc-wheels#89](https://github.com/mypyc/mypy_mypyc-wheels/pull/89)).
1243
+
1244
+ ### `--strict-bytes`
1245
+
1246
+ By default, mypy treats `bytearray` and `memoryview` values as assignable to the `bytes`
1247
+ type, for historical reasons. Use the `--strict-bytes` flag to disable this
1248
+ behavior. [PEP 688](https://peps.python.org/pep-0688) specified the removal of this
1249
+ special case. The flag will be enabled by default in **mypy 2.0**.
1250
+
1251
+ Contributed by Ali Hamdan (PR [18263](https://github.com/python/mypy/pull/18263)) and
1252
+ Shantanu Jain (PR [13952](https://github.com/python/mypy/pull/13952)).
1253
+
1254
+ ### Improvements to Reachability Analysis and Partial Type Handling in Loops
1255
+
1256
+ This change results in mypy better modelling control flow within loops and hence detecting
1257
+ several previously ignored issues. In some cases, this change may require additional
1258
+ explicit variable annotations.
1259
+
1260
+ Contributed by Christoph Tyralla (PR [18180](https://github.com/python/mypy/pull/18180),
1261
+ PR [18433](https://github.com/python/mypy/pull/18433)).
1262
+
1263
+ (Speaking of partial types, remember that we plan to enable `--local-partial-types`
1264
+ by default in **mypy 2.0**.)
1265
+
1266
+ ### Better Discovery of Configuration Files
1267
+
1268
+ Mypy will now walk up the filesystem (up until a repository or file system root) to discover
1269
+ configuration files. See the
1270
+ [mypy configuration file documentation](https://mypy.readthedocs.io/en/stable/config_file.html)
1271
+ for more details.
1272
+
1273
+ Contributed by Mikhail Shiryaev and Shantanu Jain
1274
+ (PR [16965](https://github.com/python/mypy/pull/16965), PR [18482](https://github.com/python/mypy/pull/18482))
1275
+
1276
+ ### Better Line Numbers for Decorators and Slice Expressions
1277
+
1278
+ Mypy now uses more correct line numbers for decorators and slice expressions. In some cases,
1279
+ you may have to change the location of a `# type: ignore` comment.
1280
+
1281
+ Contributed by Shantanu Jain (PR [18392](https://github.com/python/mypy/pull/18392),
1282
+ PR [18397](https://github.com/python/mypy/pull/18397)).
1283
+
1284
+ ### Drop Support for Python 3.8
1285
+
1286
+ Mypy no longer supports running with Python 3.8, which has reached end-of-life.
1287
+ When running mypy with Python 3.9+, it is still possible to type check code
1288
+ that needs to support Python 3.8 with the `--python-version 3.8` argument.
1289
+ Support for this will be dropped in the first half of 2025!
1290
+
1291
+ Contributed by Marc Mueller (PR [17492](https://github.com/python/mypy/pull/17492)).
1292
+
1293
+ ### Mypyc Improvements
1294
+
1295
+ * Fix `__init__` for classes with `@attr.s(slots=True)` (Advait Dixit, PR [18447](https://github.com/python/mypy/pull/18447))
1296
+ * Report error for nested class instead of crashing (Valentin Stanciu, PR [18460](https://github.com/python/mypy/pull/18460))
1297
+ * Fix `InitVar` for dataclasses (Advait Dixit, PR [18319](https://github.com/python/mypy/pull/18319))
1298
+ * Remove unnecessary mypyc files from wheels (Marc Mueller, PR [18416](https://github.com/python/mypy/pull/18416))
1299
+ * Fix issues with relative imports (Advait Dixit, PR [18286](https://github.com/python/mypy/pull/18286))
1300
+ * Add faster primitive for some list get item operations (Jukka Lehtosalo, PR [18136](https://github.com/python/mypy/pull/18136))
1301
+ * Fix iteration over `NamedTuple` objects (Advait Dixit, PR [18254](https://github.com/python/mypy/pull/18254))
1302
+ * Mark mypyc package with `py.typed` (bzoracler, PR [18253](https://github.com/python/mypy/pull/18253))
1303
+ * Fix list index while checking for `Enum` class (Advait Dixit, PR [18426](https://github.com/python/mypy/pull/18426))
1304
+
1305
+ ### Stubgen Improvements
1306
+
1307
+ * Improve dataclass init signatures (Marc Mueller, PR [18430](https://github.com/python/mypy/pull/18430))
1308
+ * Preserve `dataclass_transform` decorator (Marc Mueller, PR [18418](https://github.com/python/mypy/pull/18418))
1309
+ * Fix `UnpackType` for 3.11+ (Marc Mueller, PR [18421](https://github.com/python/mypy/pull/18421))
1310
+ * Improve `self` annotations (Marc Mueller, PR [18420](https://github.com/python/mypy/pull/18420))
1311
+ * Print `InspectError` traceback in stubgen `walk_packages` when verbose is specified (Gareth, PR [18224](https://github.com/python/mypy/pull/18224))
1312
+
1313
+ ### Stubtest Improvements
1314
+
1315
+ * Fix crash with numpy array default values (Ali Hamdan, PR [18353](https://github.com/python/mypy/pull/18353))
1316
+ * Distinguish metaclass attributes from class attributes (Stephen Morton, PR [18314](https://github.com/python/mypy/pull/18314))
1317
+
1318
+ ### Fixes to Crashes
1319
+
1320
+ * Prevent crash with `Unpack` of a fixed tuple in PEP695 type alias (Stanislav Terliakov, PR [18451](https://github.com/python/mypy/pull/18451))
1321
+ * Fix crash with `--cache-fine-grained --cache-dir=/dev/null` (Shantanu, PR [18457](https://github.com/python/mypy/pull/18457))
1322
+ * Prevent crashing when `match` arms use name of existing callable (Stanislav Terliakov, PR [18449](https://github.com/python/mypy/pull/18449))
1323
+ * Gracefully handle encoding errors when writing to stdout (Brian Schubert, PR [18292](https://github.com/python/mypy/pull/18292))
1324
+ * Prevent crash on generic NamedTuple with unresolved typevar bound (Stanislav Terliakov, PR [18585](https://github.com/python/mypy/pull/18585))
1325
+
1326
+ ### Documentation Updates
1327
+
1328
+ * Add inline tabs to documentation (Marc Mueller, PR [18262](https://github.com/python/mypy/pull/18262))
1329
+ * Document any `TYPE_CHECKING` name works (Shantanu, PR [18443](https://github.com/python/mypy/pull/18443))
1330
+ * Update documentation to not mention 3.8 where possible (sobolevn, PR [18455](https://github.com/python/mypy/pull/18455))
1331
+ * Mention `ignore_errors` in exclude documentation (Shantanu, PR [18412](https://github.com/python/mypy/pull/18412))
1332
+ * Add `Self` misuse to common issues (Shantanu, PR [18261](https://github.com/python/mypy/pull/18261))
1333
+
1334
+ ### Other Notable Fixes and Improvements
1335
+
1336
+ * Fix literal context for ternary expressions (Ivan Levkivskyi, PR [18545](https://github.com/python/mypy/pull/18545))
1337
+ * Ignore `dataclass.__replace__` LSP violations (Marc Mueller, PR [18464](https://github.com/python/mypy/pull/18464))
1338
+ * Bind `self` to the class being defined when checking multiple inheritance (Stanislav Terliakov, PR [18465](https://github.com/python/mypy/pull/18465))
1339
+ * Fix attribute type resolution with multiple inheritance (Stanislav Terliakov, PR [18415](https://github.com/python/mypy/pull/18415))
1340
+ * Improve security of our GitHub Actions (sobolevn, PR [18413](https://github.com/python/mypy/pull/18413))
1341
+ * Unwrap `type[Union[...]]` when solving type variable constraints (Stanislav Terliakov, PR [18266](https://github.com/python/mypy/pull/18266))
1342
+ * Allow `Any` to match sequence patterns in match/case (Stanislav Terliakov, PR [18448](https://github.com/python/mypy/pull/18448))
1343
+ * Fix parent generics mapping when overriding generic attribute with property (Stanislav Terliakov, PR [18441](https://github.com/python/mypy/pull/18441))
1344
+ * Add dedicated error code for explicit `Any` (Shantanu, PR [18398](https://github.com/python/mypy/pull/18398))
1345
+ * Reject invalid `ParamSpec` locations (Stanislav Terliakov, PR [18278](https://github.com/python/mypy/pull/18278))
1346
+ * Stop suggesting stubs that have been removed from typeshed (Shantanu, PR [18373](https://github.com/python/mypy/pull/18373))
1347
+ * Allow inverting `--local-partial-types` (Shantanu, PR [18377](https://github.com/python/mypy/pull/18377))
1348
+ * Allow to use `Final` and `ClassVar` after Python 3.13 (정승원, PR [18358](https://github.com/python/mypy/pull/18358))
1349
+ * Update suggestions to include latest stubs in typeshed (Shantanu, PR [18366](https://github.com/python/mypy/pull/18366))
1350
+ * Fix `--install-types` masking failure details (wyattscarpenter, PR [17485](https://github.com/python/mypy/pull/17485))
1351
+ * Reject promotions when checking against protocols (Christoph Tyralla, PR [18360](https://github.com/python/mypy/pull/18360))
1352
+ * Don't erase type object arguments in diagnostics (Shantanu, PR [18352](https://github.com/python/mypy/pull/18352))
1353
+ * Clarify status in `dmypy status` output (Kcornw, PR [18331](https://github.com/python/mypy/pull/18331))
1354
+ * Disallow no-argument generic aliases when using PEP 613 explicit aliases (Brian Schubert, PR [18173](https://github.com/python/mypy/pull/18173))
1355
+ * Suppress errors for unreachable branches in conditional expressions (Brian Schubert, PR [18295](https://github.com/python/mypy/pull/18295))
1356
+ * Do not allow `ClassVar` and `Final` in `TypedDict` and `NamedTuple` (sobolevn, PR [18281](https://github.com/python/mypy/pull/18281))
1357
+ * Report error if not enough or too many types provided to `TypeAliasType` (bzoracler, PR [18308](https://github.com/python/mypy/pull/18308))
1358
+ * Use more precise context for `TypedDict` plugin errors (Brian Schubert, PR [18293](https://github.com/python/mypy/pull/18293))
1359
+ * Use more precise context for invalid type argument errors (Brian Schubert, PR [18290](https://github.com/python/mypy/pull/18290))
1360
+ * Do not allow `type[]` to contain `Literal` types (sobolevn, PR [18276](https://github.com/python/mypy/pull/18276))
1361
+ * Allow bytearray/bytes comparisons with `--strict-bytes` (Jukka Lehtosalo, PR [18255](https://github.com/python/mypy/pull/18255))
1362
+
1363
+ ### Acknowledgements
1364
+
1365
+ Thanks to all mypy contributors who contributed to this release:
1366
+
1367
+ - Advait Dixit
1368
+ - Ali Hamdan
1369
+ - Brian Schubert
1370
+ - bzoracler
1371
+ - Cameron Matsui
1372
+ - Christoph Tyralla
1373
+ - Gareth
1374
+ - Ivan Levkivskyi
1375
+ - Jukka Lehtosalo
1376
+ - Kcornw
1377
+ - Marc Mueller
1378
+ - Mikhail f. Shiryaev
1379
+ - Shantanu
1380
+ - sobolevn
1381
+ - Stanislav Terliakov
1382
+ - Stephen Morton
1383
+ - Valentin Stanciu
1384
+ - Viktor Szépe
1385
+ - wyattscarpenter
1386
+ - 정승원
1387
+
1388
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
1389
+
1390
+ ## Mypy 1.14
1391
+
1392
+ We’ve just uploaded mypy 1.14 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
1393
+ Mypy is a static type checker for Python. This release includes new features and bug fixes.
1394
+ You can install it as follows:
1395
+
1396
+ python3 -m pip install -U mypy
1397
+
1398
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
1399
+
1400
+ ### Change to Enum Membership Semantics
1401
+
1402
+ As per the updated [typing specification for enums](https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members),
1403
+ enum members must be left unannotated.
1404
+
1405
+ ```python
1406
+ class Pet(Enum):
1407
+ CAT = 1 # Member attribute
1408
+ DOG = 2 # Member attribute
1409
+
1410
+ # New error: Enum members must be left unannotated
1411
+ WOLF: int = 3
1412
+
1413
+ species: str # Considered a non-member attribute
1414
+ ```
1415
+
1416
+ In particular, the specification change can result in issues in type stubs (`.pyi` files), since
1417
+ historically it was common to leave the value absent:
1418
+
1419
+ ```python
1420
+ # In a type stub (.pyi file)
1421
+
1422
+ class Pet(Enum):
1423
+ # Change in semantics: previously considered members,
1424
+ # now non-member attributes
1425
+ CAT: int
1426
+ DOG: int
1427
+
1428
+ # Mypy will now issue a warning if it detects this
1429
+ # situation in type stubs:
1430
+ # > Detected enum "Pet" in a type stub with zero
1431
+ # > members. There is a chance this is due to a recent
1432
+ # > change in the semantics of enum membership. If so,
1433
+ # > use `member = value` to mark an enum member,
1434
+ # > instead of `member: type`
1435
+
1436
+ class Pet(Enum):
1437
+ # As per the specification, you should now do one of
1438
+ # the following:
1439
+ DOG = 1 # Member attribute with value 1 and known type
1440
+ WOLF = cast(int, ...) # Member attribute with unknown
1441
+ # value but known type
1442
+ LION = ... # Member attribute with unknown value and
1443
+ # # unknown type
1444
+ ```
1445
+
1446
+ Contributed by Terence Honles (PR [17207](https://github.com/python/mypy/pull/17207)) and
1447
+ Shantanu Jain (PR [18068](https://github.com/python/mypy/pull/18068)).
1448
+
1449
+ ### Support for @deprecated Decorator (PEP 702)
1450
+
1451
+ Mypy can now issue errors or notes when code imports a deprecated feature
1452
+ explicitly with a `from mod import depr` statement, or uses a deprecated feature
1453
+ imported otherwise or defined locally. Features are considered deprecated when
1454
+ decorated with `warnings.deprecated`, as specified in [PEP 702](https://peps.python.org/pep-0702).
1455
+
1456
+ You can enable the error code via `--enable-error-code=deprecated` on the mypy
1457
+ command line or `enable_error_code = deprecated` in the mypy config file.
1458
+ Use the command line flag `--report-deprecated-as-note` or config file option
1459
+ `report_deprecated_as_note=True` to turn all such errors into notes.
1460
+
1461
+ Deprecation errors will be enabled by default in a future mypy version.
1462
+
1463
+ This feature was contributed by Christoph Tyralla.
1464
+
1465
+ List of changes:
1466
+
1467
+ * Add basic support for PEP 702 (`@deprecated`) (Christoph Tyralla, PR [17476](https://github.com/python/mypy/pull/17476))
1468
+ * Support descriptors with `@deprecated` (Christoph Tyralla, PR [18090](https://github.com/python/mypy/pull/18090))
1469
+ * Make "deprecated" note an error, disabled by default (Valentin Stanciu, PR [18192](https://github.com/python/mypy/pull/18192))
1470
+ * Consider all possible type positions with `@deprecated` (Christoph Tyralla, PR [17926](https://github.com/python/mypy/pull/17926))
1471
+ * Improve the handling of explicit type annotations in assignment statements with `@deprecated` (Christoph Tyralla, PR [17899](https://github.com/python/mypy/pull/17899))
1472
+
1473
+ ### Optionally Analyzing Untyped Modules
1474
+
1475
+ Mypy normally doesn't analyze imports from third-party modules (installed using pip, for example)
1476
+ if there are no stubs or a py.typed marker file. To force mypy to analyze these imports, you
1477
+ can now use the `--follow-untyped-imports` flag or set the `follow_untyped_imports`
1478
+ config file option to True. This can be set either in the global section of your mypy config
1479
+ file, or individually on a per-module basis.
1480
+
1481
+ This feature was contributed by Jannick Kremer.
1482
+
1483
+ List of changes:
1484
+
1485
+ * Implement flag to allow type checking of untyped modules (Jannick Kremer, PR [17712](https://github.com/python/mypy/pull/17712))
1486
+ * Warn about `--follow-untyped-imports` (Shantanu, PR [18249](https://github.com/python/mypy/pull/18249))
1487
+
1488
+ ### Support New Style Type Variable Defaults (PEP 696)
1489
+
1490
+ Mypy now supports type variable defaults using the new syntax described in PEP 696, which
1491
+ was introduced in Python 3.13. Example:
1492
+
1493
+ ```python
1494
+ @dataclass
1495
+ class Box[T = int]: # Set default for "T"
1496
+ value: T | None = None
1497
+
1498
+ reveal_type(Box()) # type is Box[int], since it's the default
1499
+ reveal_type(Box(value="Hello World!")) # type is Box[str]
1500
+ ```
1501
+
1502
+ This feature was contributed by Marc Mueller (PR [17985](https://github.com/python/mypy/pull/17985)).
1503
+
1504
+ ### Improved For Loop Index Variable Type Narrowing
1505
+
1506
+ Mypy now preserves the literal type of for loop index variables, to support `TypedDict`
1507
+ lookups. Example:
1508
+
1509
+ ```python
1510
+ from typing import TypedDict
1511
+
1512
+ class X(TypedDict):
1513
+ hourly: int
1514
+ daily: int
1515
+
1516
+ def func(x: X) -> int:
1517
+ s = 0
1518
+ for var in ("hourly", "daily"):
1519
+ # "Union[Literal['hourly']?, Literal['daily']?]"
1520
+ reveal_type(var)
1521
+
1522
+ # x[var] no longer triggers a literal-required error
1523
+ s += x[var]
1524
+ return s
1525
+ ```
1526
+
1527
+ This was contributed by Marc Mueller (PR [18014](https://github.com/python/mypy/pull/18014)).
1528
+
1529
+ ### Mypyc Improvements
1530
+
1531
+ * Document optimized bytes operations and additional str operations (Jukka Lehtosalo, PR [18242](https://github.com/python/mypy/pull/18242))
1532
+ * Add primitives and specialization for `ord()` (Jukka Lehtosalo, PR [18240](https://github.com/python/mypy/pull/18240))
1533
+ * Optimize `str.encode` with specializations for common used encodings (Valentin Stanciu, PR [18232](https://github.com/python/mypy/pull/18232))
1534
+ * Fix fall back to generic operation for staticmethod and classmethod (Advait Dixit, PR [18228](https://github.com/python/mypy/pull/18228))
1535
+ * Support unicode surrogates in string literals (Jukka Lehtosalo, PR [18209](https://github.com/python/mypy/pull/18209))
1536
+ * Fix index variable in for loop with `builtins.enumerate` (Advait Dixit, PR [18202](https://github.com/python/mypy/pull/18202))
1537
+ * Fix check for enum classes (Advait Dixit, PR [18178](https://github.com/python/mypy/pull/18178))
1538
+ * Fix loading type from imported modules (Advait Dixit, PR [18158](https://github.com/python/mypy/pull/18158))
1539
+ * Fix initializers of final attributes in class body (Jared Hance, PR [18031](https://github.com/python/mypy/pull/18031))
1540
+ * Fix name generation for modules with similar full names (aatle, PR [18001](https://github.com/python/mypy/pull/18001))
1541
+ * Fix relative imports in `__init__.py` (Shantanu, PR [17979](https://github.com/python/mypy/pull/17979))
1542
+ * Optimize dunder methods (jairov4, PR [17934](https://github.com/python/mypy/pull/17934))
1543
+ * Replace deprecated `_PyDict_GetItemStringWithError` (Marc Mueller, PR [17930](https://github.com/python/mypy/pull/17930))
1544
+ * Fix wheel build for cp313-win (Marc Mueller, PR [17941](https://github.com/python/mypy/pull/17941))
1545
+ * Use public PyGen_GetCode instead of vendored implementation (Marc Mueller, PR [17931](https://github.com/python/mypy/pull/17931))
1546
+ * Optimize calls to final classes (jairov4, PR [17886](https://github.com/python/mypy/pull/17886))
1547
+ * Support ellipsis (`...`) expressions in class bodies (Newbyte, PR [17923](https://github.com/python/mypy/pull/17923))
1548
+ * Sync `pythoncapi_compat.h` (Marc Mueller, PR [17929](https://github.com/python/mypy/pull/17929))
1549
+ * Add `runtests.py mypyc-fast` for running fast mypyc tests (Jukka Lehtosalo, PR [17906](https://github.com/python/mypy/pull/17906))
1550
+
1551
+ ### Stubgen Improvements
1552
+
1553
+ * Do not include mypy generated symbols (Ali Hamdan, PR [18137](https://github.com/python/mypy/pull/18137))
1554
+ * Fix `FunctionContext.fullname` for nested classes (Chad Dombrova, PR [17963](https://github.com/python/mypy/pull/17963))
1555
+ * Add flagfile support (Ruslan Sayfutdinov, PR [18061](https://github.com/python/mypy/pull/18061))
1556
+ * Add support for PEP 695 and PEP 696 syntax (Ali Hamdan, PR [18054](https://github.com/python/mypy/pull/18054))
1557
+
1558
+ ### Stubtest Improvements
1559
+
1560
+ * Allow the use of `--show-traceback` and `--pdb` with stubtest (Stephen Morton, PR [18037](https://github.com/python/mypy/pull/18037))
1561
+ * Verify `__all__` exists in stub (Sebastian Rittau, PR [18005](https://github.com/python/mypy/pull/18005))
1562
+ * Stop telling people to use double underscores (Jelle Zijlstra, PR [17897](https://github.com/python/mypy/pull/17897))
1563
+
1564
+ ### Documentation Updates
1565
+
1566
+ * Update config file documentation (sobolevn, PR [18103](https://github.com/python/mypy/pull/18103))
1567
+ * Improve contributor documentation for Windows (ag-tafe, PR [18097](https://github.com/python/mypy/pull/18097))
1568
+ * Correct note about `--disallow-any-generics` flag in documentation (Abel Sen, PR [18055](https://github.com/python/mypy/pull/18055))
1569
+ * Further caution against `--follow-imports=skip` (Shantanu, PR [18048](https://github.com/python/mypy/pull/18048))
1570
+ * Fix the edit page button link in documentation (Kanishk Pachauri, PR [17933](https://github.com/python/mypy/pull/17933))
1571
+
1572
+ ### Other Notables Fixes and Improvements
1573
+
1574
+ * Allow enum members to have type objects as values (Jukka Lehtosalo, PR [19160](https://github.com/python/mypy/pull/19160))
1575
+ * Show `Protocol` `__call__` for arguments with incompatible types (MechanicalConstruct, PR [18214](https://github.com/python/mypy/pull/18214))
1576
+ * Make join and meet symmetric with `strict_optional` (MechanicalConstruct, PR [18227](https://github.com/python/mypy/pull/18227))
1577
+ * Preserve block unreachablility when checking function definitions with constrained TypeVars (Brian Schubert, PR [18217](https://github.com/python/mypy/pull/18217))
1578
+ * Do not include non-init fields in the synthesized `__replace__` method for dataclasses (Victorien, PR [18221](https://github.com/python/mypy/pull/18221))
1579
+ * Disallow `TypeVar` constraints parameterized by type variables (Brian Schubert, PR [18186](https://github.com/python/mypy/pull/18186))
1580
+ * Always complain about invalid varargs and varkwargs (Shantanu, PR [18207](https://github.com/python/mypy/pull/18207))
1581
+ * Set default strict_optional state to True (Shantanu, PR [18198](https://github.com/python/mypy/pull/18198))
1582
+ * Preserve type variable default None in type alias (Sukhorosov Aleksey, PR [18197](https://github.com/python/mypy/pull/18197))
1583
+ * Add checks for invalid usage of continue/break/return in `except*` block (coldwolverine, PR [18132](https://github.com/python/mypy/pull/18132))
1584
+ * Do not consider bare TypeVar not overlapping with None for reachability analysis (Stanislav Terliakov, PR [18138](https://github.com/python/mypy/pull/18138))
1585
+ * Special case `types.DynamicClassAttribute` as property-like (Stephen Morton, PR [18150](https://github.com/python/mypy/pull/18150))
1586
+ * Disallow bare `ParamSpec` in type aliases (Brian Schubert, PR [18174](https://github.com/python/mypy/pull/18174))
1587
+ * Move long_description metadata to pyproject.toml (Marc Mueller, PR [18172](https://github.com/python/mypy/pull/18172))
1588
+ * Support `==`-based narrowing of Optional (Christoph Tyralla, PR [18163](https://github.com/python/mypy/pull/18163))
1589
+ * Allow TypedDict assignment of Required item to NotRequired ReadOnly item (Brian Schubert, PR [18164](https://github.com/python/mypy/pull/18164))
1590
+ * Allow nesting of Annotated with TypedDict special forms inside TypedDicts (Brian Schubert, PR [18165](https://github.com/python/mypy/pull/18165))
1591
+ * Infer generic type arguments for slice expressions (Brian Schubert, PR [18160](https://github.com/python/mypy/pull/18160))
1592
+ * Fix checking of match sequence pattern against bounded type variables (Brian Schubert, PR [18091](https://github.com/python/mypy/pull/18091))
1593
+ * Fix incorrect truthyness for Enum types and literals (David Salvisberg, PR [17337](https://github.com/python/mypy/pull/17337))
1594
+ * Move static project metadata to pyproject.toml (Marc Mueller, PR [18146](https://github.com/python/mypy/pull/18146))
1595
+ * Fallback to stdlib json if integer exceeds 64-bit range (q0w, PR [18148](https://github.com/python/mypy/pull/18148))
1596
+ * Fix 'or' pattern structural matching exhaustiveness (yihong, PR [18119](https://github.com/python/mypy/pull/18119))
1597
+ * Fix type inference of positional parameter in class pattern involving builtin subtype (Brian Schubert, PR [18141](https://github.com/python/mypy/pull/18141))
1598
+ * Fix `[override]` error with no line number when argument node has no line number (Brian Schubert, PR [18122](https://github.com/python/mypy/pull/18122))
1599
+ * Fix some dmypy crashes (Ivan Levkivskyi, PR [18098](https://github.com/python/mypy/pull/18098))
1600
+ * Fix subtyping between instance type and overloaded (Shantanu, PR [18102](https://github.com/python/mypy/pull/18102))
1601
+ * Clean up new_semantic_analyzer config (Shantanu, PR [18071](https://github.com/python/mypy/pull/18071))
1602
+ * Issue warning for enum with no members in stub (Shantanu, PR [18068](https://github.com/python/mypy/pull/18068))
1603
+ * Fix enum attributes are not members (Terence Honles, PR [17207](https://github.com/python/mypy/pull/17207))
1604
+ * Fix crash when checking slice expression with step 0 in tuple index (Brian Schubert, PR [18063](https://github.com/python/mypy/pull/18063))
1605
+ * Allow union-with-callable attributes to be overridden by methods (Brian Schubert, PR [18018](https://github.com/python/mypy/pull/18018))
1606
+ * Emit `[mutable-override]` for covariant override of attribute with method (Brian Schubert, PR [18058](https://github.com/python/mypy/pull/18058))
1607
+ * Support ParamSpec mapping with `functools.partial` (Stanislav Terliakov, PR [17355](https://github.com/python/mypy/pull/17355))
1608
+ * Fix approved stub ignore, remove normpath (Shantanu, PR [18045](https://github.com/python/mypy/pull/18045))
1609
+ * Make `disallow-any-unimported` flag invertible (Séamus Ó Ceanainn, PR [18030](https://github.com/python/mypy/pull/18030))
1610
+ * Filter to possible package paths before trying to resolve a module (falsedrow, PR [18038](https://github.com/python/mypy/pull/18038))
1611
+ * Fix overlap check for ParamSpec types (Jukka Lehtosalo, PR [18040](https://github.com/python/mypy/pull/18040))
1612
+ * Do not prioritize ParamSpec signatures during overload resolution (Stanislav Terliakov, PR [18033](https://github.com/python/mypy/pull/18033))
1613
+ * Fix ternary union for literals (Ivan Levkivskyi, PR [18023](https://github.com/python/mypy/pull/18023))
1614
+ * Fix compatibility checks for conditional function definitions using decorators (Brian Schubert, PR [18020](https://github.com/python/mypy/pull/18020))
1615
+ * TypeGuard should be bool not Any when matching TypeVar (Evgeniy Slobodkin, PR [17145](https://github.com/python/mypy/pull/17145))
1616
+ * Fix convert-cache tool (Shantanu, PR [17974](https://github.com/python/mypy/pull/17974))
1617
+ * Fix generator comprehension with mypyc (Shantanu, PR [17969](https://github.com/python/mypy/pull/17969))
1618
+ * Fix crash issue when using shadowfile with pretty (Max Chang, PR [17894](https://github.com/python/mypy/pull/17894))
1619
+ * Fix multiple nested classes with new generics syntax (Max Chang, PR [17820](https://github.com/python/mypy/pull/17820))
1620
+ * Better error for `mypy -p package` without py.typed (Joe Gordon, PR [17908](https://github.com/python/mypy/pull/17908))
1621
+ * Emit error for `raise NotImplemented` (Brian Schubert, PR [17890](https://github.com/python/mypy/pull/17890))
1622
+ * Add `is_lvalue` attribute to AttributeContext (Brian Schubert, PR [17881](https://github.com/python/mypy/pull/17881))
1623
+
1624
+ ### Acknowledgements
1625
+
1626
+ Thanks to all mypy contributors who contributed to this release:
1627
+
1628
+ - aatle
1629
+ - Abel Sen
1630
+ - Advait Dixit
1631
+ - ag-tafe
1632
+ - Alex Waygood
1633
+ - Ali Hamdan
1634
+ - Brian Schubert
1635
+ - Carlton Gibson
1636
+ - Chad Dombrova
1637
+ - Chelsea Durazo
1638
+ - chiri
1639
+ - Christoph Tyralla
1640
+ - coldwolverine
1641
+ - David Salvisberg
1642
+ - Ekin Dursun
1643
+ - Evgeniy Slobodkin
1644
+ - falsedrow
1645
+ - Gaurav Giri
1646
+ - Ihor
1647
+ - Ivan Levkivskyi
1648
+ - jairov4
1649
+ - Jannick Kremer
1650
+ - Jared Hance
1651
+ - Jelle Zijlstra
1652
+ - jianghuyiyuan
1653
+ - Joe Gordon
1654
+ - John Doknjas
1655
+ - Jukka Lehtosalo
1656
+ - Kanishk Pachauri
1657
+ - Marc Mueller
1658
+ - Max Chang
1659
+ - MechanicalConstruct
1660
+ - Newbyte
1661
+ - q0w
1662
+ - Ruslan Sayfutdinov
1663
+ - Sebastian Rittau
1664
+ - Shantanu
1665
+ - sobolevn
1666
+ - Stanislav Terliakov
1667
+ - Stephen Morton
1668
+ - Sukhorosov Aleksey
1669
+ - Séamus Ó Ceanainn
1670
+ - Terence Honles
1671
+ - Valentin Stanciu
1672
+ - vasiliy
1673
+ - Victorien
1674
+ - yihong
1675
+
1676
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
1677
+
1678
+
1679
+ ## Mypy 1.13
1680
+
1681
+ We’ve just uploaded mypy 1.13 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
1682
+ Mypy is a static type checker for Python. You can install it as follows:
1683
+
1684
+ python3 -m pip install -U mypy
1685
+
1686
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
1687
+
1688
+ Note that unlike typical releases, Mypy 1.13 does not have any changes to type checking semantics
1689
+ from 1.12.1.
1690
+
1691
+ ### Improved Performance
1692
+
1693
+ Mypy 1.13 contains several performance improvements. Users can expect mypy to be 5-20% faster.
1694
+ In environments with long search paths (such as environments using many editable installs), mypy
1695
+ can be significantly faster, e.g. 2.2x faster in the use case targeted by these improvements.
1696
+
1697
+ Mypy 1.13 allows use of the `orjson` library for handling the cache instead of the stdlib `json`,
1698
+ for improved performance. You can ensure the presence of `orjson` using the `faster-cache` extra:
1699
+
1700
+ python3 -m pip install -U mypy[faster-cache]
1701
+
1702
+ Mypy may depend on `orjson` by default in the future.
1703
+
1704
+ These improvements were contributed by Shantanu.
1705
+
1706
+ List of changes:
1707
+ * Significantly speed up file handling error paths (Shantanu, PR [17920](https://github.com/python/mypy/pull/17920))
1708
+ * Use fast path in modulefinder more often (Shantanu, PR [17950](https://github.com/python/mypy/pull/17950))
1709
+ * Let mypyc optimise os.path.join (Shantanu, PR [17949](https://github.com/python/mypy/pull/17949))
1710
+ * Make is_sub_path faster (Shantanu, PR [17962](https://github.com/python/mypy/pull/17962))
1711
+ * Speed up stubs suggestions (Shantanu, PR [17965](https://github.com/python/mypy/pull/17965))
1712
+ * Use sha1 for hashing (Shantanu, PR [17953](https://github.com/python/mypy/pull/17953))
1713
+ * Use orjson instead of json, when available (Shantanu, PR [17955](https://github.com/python/mypy/pull/17955))
1714
+ * Add faster-cache extra, test in CI (Shantanu, PR [17978](https://github.com/python/mypy/pull/17978))
1715
+
1716
+ ### Acknowledgements
1717
+ Thanks to all mypy contributors who contributed to this release:
1718
+
1719
+ - Shantanu Jain
1720
+ - Jukka Lehtosalo
1721
+
1722
+ ## Mypy 1.12
1723
+
1724
+ We’ve just uploaded mypy 1.12 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type
1725
+ checker for Python. This release includes new features, performance improvements and bug fixes.
1726
+ You can install it as follows:
1727
+
1728
+ python3 -m pip install -U mypy
1729
+
1730
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
1731
+
1732
+ ### Support Python 3.12 Syntax for Generics (PEP 695)
1733
+
1734
+ Support for the new type parameter syntax introduced in Python 3.12 is now enabled by default,
1735
+ documented, and no longer experimental. It was available through a feature flag in
1736
+ mypy 1.11 as an experimental feature.
1737
+
1738
+ This example demonstrates the new syntax:
1739
+
1740
+ ```python
1741
+ # Generic function
1742
+ def f[T](x: T) -> T: ...
1743
+
1744
+ reveal_type(f(1)) # Revealed type is 'int'
1745
+
1746
+ # Generic class
1747
+ class C[T]:
1748
+ def __init__(self, x: T) -> None:
1749
+ self.x = x
1750
+
1751
+ c = C('a')
1752
+ reveal_type(c.x) # Revealed type is 'str'
1753
+
1754
+ # Type alias
1755
+ type A[T] = C[list[T]]
1756
+ ```
1757
+
1758
+ For more information, refer to the [documentation](https://mypy.readthedocs.io/en/latest/generics.html).
1759
+
1760
+ These improvements are included:
1761
+
1762
+ * Document Python 3.12 type parameter syntax (Jukka Lehtosalo, PR [17816](https://github.com/python/mypy/pull/17816))
1763
+ * Further documentation updates (Jukka Lehtosalo, PR [17826](https://github.com/python/mypy/pull/17826))
1764
+ * Allow Self return types with contravariance (Jukka Lehtosalo, PR [17786](https://github.com/python/mypy/pull/17786))
1765
+ * Enable new type parameter syntax by default (Jukka Lehtosalo, PR [17798](https://github.com/python/mypy/pull/17798))
1766
+ * Generate error if new-style type alias used as base class (Jukka Lehtosalo, PR [17789](https://github.com/python/mypy/pull/17789))
1767
+ * Inherit variance if base class has explicit variance (Jukka Lehtosalo, PR [17787](https://github.com/python/mypy/pull/17787))
1768
+ * Fix crash on invalid type var reference (Jukka Lehtosalo, PR [17788](https://github.com/python/mypy/pull/17788))
1769
+ * Fix covariance of frozen dataclasses (Jukka Lehtosalo, PR [17783](https://github.com/python/mypy/pull/17783))
1770
+ * Allow covariance with attribute that has "`_`" name prefix (Jukka Lehtosalo, PR [17782](https://github.com/python/mypy/pull/17782))
1771
+ * Support `Annotated[...]` in new-style type aliases (Jukka Lehtosalo, PR [17777](https://github.com/python/mypy/pull/17777))
1772
+ * Fix nested generic classes (Jukka Lehtosalo, PR [17776](https://github.com/python/mypy/pull/17776))
1773
+ * Add detection and error reporting for the use of incorrect expressions within the scope of a type parameter and a type alias (Kirill Podoprigora, PR [17560](https://github.com/python/mypy/pull/17560))
1774
+
1775
+ ### Basic Support for Python 3.13
1776
+
1777
+ This release adds partial support for Python 3.13 features and compiled binaries for
1778
+ Python 3.13. Mypyc now also supports Python 3.13.
1779
+
1780
+ In particular, these features are supported:
1781
+ * Various new stdlib features and changes (through typeshed stub improvements)
1782
+ * `typing.ReadOnly` (see below for more)
1783
+ * `typing.TypeIs` (added in mypy 1.10, [PEP 742](https://peps.python.org/pep-0742/))
1784
+ * Type parameter defaults when using the legacy syntax ([PEP 696](https://peps.python.org/pep-0696/))
1785
+
1786
+ These features are not supported yet:
1787
+ * `warnings.deprecated` ([PEP 702](https://peps.python.org/pep-0702/))
1788
+ * Type parameter defaults when using Python 3.12 type parameter syntax
1789
+
1790
+ ### Mypyc Support for Python 3.13
1791
+
1792
+ Mypyc now supports Python 3.13. This was contributed by Marc Mueller, with additional
1793
+ fixes by Jukka Lehtosalo. Free threaded Python 3.13 builds are not supported yet.
1794
+
1795
+ List of changes:
1796
+
1797
+ * Add additional includes for Python 3.13 (Marc Mueller, PR [17506](https://github.com/python/mypy/pull/17506))
1798
+ * Add another include for Python 3.13 (Marc Mueller, PR [17509](https://github.com/python/mypy/pull/17509))
1799
+ * Fix ManagedDict functions for Python 3.13 (Marc Mueller, PR [17507](https://github.com/python/mypy/pull/17507))
1800
+ * Update mypyc test output for Python 3.13 (Marc Mueller, PR [17508](https://github.com/python/mypy/pull/17508))
1801
+ * Fix `PyUnicode` functions for Python 3.13 (Marc Mueller, PR [17504](https://github.com/python/mypy/pull/17504))
1802
+ * Fix `_PyObject_LookupAttrId` for Python 3.13 (Marc Mueller, PR [17505](https://github.com/python/mypy/pull/17505))
1803
+ * Fix `_PyList_Extend` for Python 3.13 (Marc Mueller, PR [17503](https://github.com/python/mypy/pull/17503))
1804
+ * Fix `gen_is_coroutine` for Python 3.13 (Marc Mueller, PR [17501](https://github.com/python/mypy/pull/17501))
1805
+ * Fix `_PyObject_FastCall` for Python 3.13 (Marc Mueller, PR [17502](https://github.com/python/mypy/pull/17502))
1806
+ * Avoid uses of `_PyObject_CallMethodOneArg` on 3.13 (Jukka Lehtosalo, PR [17526](https://github.com/python/mypy/pull/17526))
1807
+ * Don't rely on `_PyType_CalculateMetaclass` on 3.13 (Jukka Lehtosalo, PR [17525](https://github.com/python/mypy/pull/17525))
1808
+ * Don't use `_PyUnicode_FastCopyCharacters` on 3.13 (Jukka Lehtosalo, PR [17524](https://github.com/python/mypy/pull/17524))
1809
+ * Don't use `_PyUnicode_EQ` on 3.13, as it's no longer exported (Jukka Lehtosalo, PR [17523](https://github.com/python/mypy/pull/17523))
1810
+
1811
+ ### Inferring Unions for Conditional Expressions
1812
+
1813
+ Mypy now always tries to infer a union type for a conditional expression if left and right
1814
+ operand types are different. This results in more precise inferred types and lets mypy detect
1815
+ more issues. Example:
1816
+
1817
+ ```python
1818
+ s = "foo" if cond() else 1
1819
+ # Type of "s" is now "str | int" (it used to be "object")
1820
+ ```
1821
+
1822
+ Notably, if one of the operands has type `Any`, the type of a conditional expression is
1823
+ now `<type> | Any`. Previously the inferred type was just `Any`. The new type essentially
1824
+ indicates that the value can be of type `<type>`, and potentially of some (unknown) type.
1825
+ Most operations performed on the result must also be valid for `<type>`.
1826
+ Example where this is relevant:
1827
+
1828
+ ```python
1829
+ from typing import Any
1830
+
1831
+ def func(a: Any, b: bool) -> None:
1832
+ x = a if b else None
1833
+ # Type of x is "Any | None"
1834
+ print(x.y) # Error: None has no attribute "y"
1835
+ ```
1836
+
1837
+ This feature was contributed by Ivan Levkivskyi (PR [17427](https://github.com/python/mypy/pull/17427)).
1838
+
1839
+ ### ReadOnly Support for TypedDict (PEP 705)
1840
+
1841
+ You can now use `typing.ReadOnly` to specity TypedDict items as
1842
+ read-only ([PEP 705](https://peps.python.org/pep-0705/)):
1843
+
1844
+ ```python
1845
+ from typing import TypedDict
1846
+
1847
+ # Or "from typing ..." on Python 3.13
1848
+ from typing_extensions import ReadOnly
1849
+
1850
+ class TD(TypedDict):
1851
+ a: int
1852
+ b: ReadOnly[int]
1853
+
1854
+ d: TD = {"a": 1, "b": 2}
1855
+ d["a"] = 3 # OK
1856
+ d["b"] = 5 # Error: "b" is ReadOnly
1857
+ ```
1858
+
1859
+ This feature was contributed by Nikita Sobolev (PR [17644](https://github.com/python/mypy/pull/17644)).
1860
+
1861
+ ### Python 3.8 End of Life Approaching
1862
+
1863
+ We are planning to drop support for Python 3.8 in the next mypy feature release or the
1864
+ one after that. Python 3.8 reaches end of life in October 2024.
1865
+
1866
+ ### Planned Changes to Defaults
1867
+
1868
+ We are planning to enable `--local-partial-types` by default in mypy 2.0. This will
1869
+ often require at least minor code changes. This option is implicitly enabled by mypy
1870
+ daemon, so this makes the behavior of daemon and non-daemon modes consistent.
1871
+
1872
+ We recommend that mypy users start using local partial types soon (or to explicitly disable
1873
+ them) to prepare for the change.
1874
+
1875
+ This can also be configured in a mypy configuration file:
1876
+
1877
+ ```
1878
+ local_partial_types = True
1879
+ ```
1880
+
1881
+ For more information, refer to the
1882
+ [documentation](https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-local-partial-types).
1883
+
1884
+ ### Documentation Updates
1885
+
1886
+ Mypy documentation now uses modern syntax variants and imports in many examples. Some
1887
+ examples no longer work on Python 3.8, which is the earliest Python version that mypy supports.
1888
+
1889
+ Notably, `Iterable` and other protocols/ABCs are imported from `collections.abc` instead of
1890
+ `typing`:
1891
+ ```python
1892
+ from collections.abc import Iterable, Callable
1893
+ ```
1894
+
1895
+ Examples also avoid the upper-case aliases to built-in types: `list[str]` is used instead
1896
+ of `List[str]`. The `X | Y` union type syntax introduced in Python 3.10 is also now prevalent.
1897
+
1898
+ List of documentation updates:
1899
+
1900
+ * Document `--output=json` CLI option (Edgar Ramírez Mondragón, PR [17611](https://github.com/python/mypy/pull/17611))
1901
+ * Update various references to deprecated type aliases in docs (Jukka Lehtosalo, PR [17829](https://github.com/python/mypy/pull/17829))
1902
+ * Make "X | Y" union syntax more prominent in documentation (Jukka Lehtosalo, PR [17835](https://github.com/python/mypy/pull/17835))
1903
+ * Discuss upper bounds before self types in documentation (Jukka Lehtosalo, PR [17827](https://github.com/python/mypy/pull/17827))
1904
+ * Make changelog visible in mypy documentation (quinn-sasha, PR [17742](https://github.com/python/mypy/pull/17742))
1905
+ * List all incomplete features in `--enable-incomplete-feature` docs (sobolevn, PR [17633](https://github.com/python/mypy/pull/17633))
1906
+ * Remove the explicit setting of a pygments theme (Pradyun Gedam, PR [17571](https://github.com/python/mypy/pull/17571))
1907
+ * Document ReadOnly with TypedDict (Jukka Lehtosalo, PR [17905](https://github.com/python/mypy/pull/17905))
1908
+ * Document TypeIs (Chelsea Durazo, PR [17821](https://github.com/python/mypy/pull/17821))
1909
+
1910
+ ### Experimental Inline TypedDict Syntax
1911
+
1912
+ Mypy now supports a non-standard, experimental syntax for defining anonymous TypedDicts.
1913
+ Example:
1914
+
1915
+ ```python
1916
+ def func(n: str, y: int) -> {"name": str, "year": int}:
1917
+ return {"name": n, "year": y}
1918
+ ```
1919
+
1920
+ The feature is disabled by default. Use `--enable-incomplete-feature=InlineTypedDict` to
1921
+ enable it. *We might remove this feature in a future release.*
1922
+
1923
+ This feature was contributed by Ivan Levkivskyi (PR [17457](https://github.com/python/mypy/pull/17457)).
1924
+
1925
+ ### Stubgen Improvements
1926
+
1927
+ * Fix crash on literal class-level keywords (sobolevn, PR [17663](https://github.com/python/mypy/pull/17663))
1928
+ * Stubgen add `--version` (sobolevn, PR [17662](https://github.com/python/mypy/pull/17662))
1929
+ * Fix `stubgen --no-analysis/--parse-only` docs (sobolevn, PR [17632](https://github.com/python/mypy/pull/17632))
1930
+ * Include keyword only args when generating signatures in stubgenc (Eric Mark Martin, PR [17448](https://github.com/python/mypy/pull/17448))
1931
+ * Add support for detecting `Literal` types when extracting types from docstrings (Michael Carlstrom, PR [17441](https://github.com/python/mypy/pull/17441))
1932
+ * Use `Generator` type var defaults (Sebastian Rittau, PR [17670](https://github.com/python/mypy/pull/17670))
1933
+
1934
+ ### Stubtest Improvements
1935
+ * Add support for `cached_property` (Ali Hamdan, PR [17626](https://github.com/python/mypy/pull/17626))
1936
+ * Add `enable_incomplete_feature` validation to `stubtest` (sobolevn, PR [17635](https://github.com/python/mypy/pull/17635))
1937
+ * Fix error code handling in `stubtest` with `--mypy-config-file` (sobolevn, PR [17629](https://github.com/python/mypy/pull/17629))
1938
+
1939
+ ### Other Notables Fixes and Improvements
1940
+
1941
+ * Report error if using unsupported type parameter defaults (Jukka Lehtosalo, PR [17876](https://github.com/python/mypy/pull/17876))
1942
+ * Fix re-processing cross-reference in mypy daemon when node kind changes (Ivan Levkivskyi, PR [17883](https://github.com/python/mypy/pull/17883))
1943
+ * Don't use equality to narrow when value is IntEnum/StrEnum (Jukka Lehtosalo, PR [17866](https://github.com/python/mypy/pull/17866))
1944
+ * Don't consider None vs IntEnum comparison ambiguous (Jukka Lehtosalo, PR [17877](https://github.com/python/mypy/pull/17877))
1945
+ * Fix narrowing of IntEnum and StrEnum types (Jukka Lehtosalo, PR [17874](https://github.com/python/mypy/pull/17874))
1946
+ * Filter overload items based on self type during type inference (Jukka Lehtosalo, PR [17873](https://github.com/python/mypy/pull/17873))
1947
+ * Enable negative narrowing of union TypeVar upper bounds (Brian Schubert, PR [17850](https://github.com/python/mypy/pull/17850))
1948
+ * Fix issue with member expression formatting (Brian Schubert, PR [17848](https://github.com/python/mypy/pull/17848))
1949
+ * Avoid type size explosion when expanding types (Jukka Lehtosalo, PR [17842](https://github.com/python/mypy/pull/17842))
1950
+ * Fix negative narrowing of tuples in match statement (Brian Schubert, PR [17817](https://github.com/python/mypy/pull/17817))
1951
+ * Narrow falsey str/bytes/int to literal type (Brian Schubert, PR [17818](https://github.com/python/mypy/pull/17818))
1952
+ * Test against latest Python 3.13, make testing 3.14 easy (Shantanu, PR [17812](https://github.com/python/mypy/pull/17812))
1953
+ * Reject ParamSpec-typed callables calls with insufficient arguments (Stanislav Terliakov, PR [17323](https://github.com/python/mypy/pull/17323))
1954
+ * Fix crash when passing too many type arguments to generic base class accepting single ParamSpec (Brian Schubert, PR [17770](https://github.com/python/mypy/pull/17770))
1955
+ * Fix TypeVar upper bounds sometimes not being displayed in pretty callables (Brian Schubert, PR [17802](https://github.com/python/mypy/pull/17802))
1956
+ * Added error code for overlapping function signatures (Katrina Connors, PR [17597](https://github.com/python/mypy/pull/17597))
1957
+ * Check for `truthy-bool` in `not ...` unary expressions (sobolevn, PR [17773](https://github.com/python/mypy/pull/17773))
1958
+ * Add missing lines-covered and lines-valid attributes (Soubhik Kumar Mitra, PR [17738](https://github.com/python/mypy/pull/17738))
1959
+ * Fix another crash scenario with recursive tuple types (Ivan Levkivskyi, PR [17708](https://github.com/python/mypy/pull/17708))
1960
+ * Resolve TypeVar upper bounds in `functools.partial` (Shantanu, PR [17660](https://github.com/python/mypy/pull/17660))
1961
+ * Always reset binder when checking deferred nodes (Ivan Levkivskyi, PR [17643](https://github.com/python/mypy/pull/17643))
1962
+ * Fix crash on a callable attribute with single unpack (Ivan Levkivskyi, PR [17641](https://github.com/python/mypy/pull/17641))
1963
+ * Fix mismatched signature between checker plugin API and implementation (bzoracler, PR [17343](https://github.com/python/mypy/pull/17343))
1964
+ * Indexing a type also produces a GenericAlias (Shantanu, PR [17546](https://github.com/python/mypy/pull/17546))
1965
+ * Fix crash on self-type in callable protocol (Ivan Levkivskyi, PR [17499](https://github.com/python/mypy/pull/17499))
1966
+ * Fix crash on NamedTuple with method and error in function (Ivan Levkivskyi, PR [17498](https://github.com/python/mypy/pull/17498))
1967
+ * Add `__replace__` for dataclasses in 3.13 (Max Muoto, PR [17469](https://github.com/python/mypy/pull/17469))
1968
+ * Fix help message for `--no-namespace-packages` (Raphael Krupinski, PR [17472](https://github.com/python/mypy/pull/17472))
1969
+ * Fix typechecking for async generators (Danny Yang, PR [17452](https://github.com/python/mypy/pull/17452))
1970
+ * Fix strict optional handling in attrs plugin (Ivan Levkivskyi, PR [17451](https://github.com/python/mypy/pull/17451))
1971
+ * Allow mixing ParamSpec and TypeVarTuple in Generic (Ivan Levkivskyi, PR [17450](https://github.com/python/mypy/pull/17450))
1972
+ * Improvements to `functools.partial` of types (Shantanu, PR [17898](https://github.com/python/mypy/pull/17898))
1973
+ * Make ReadOnly TypedDict items covariant (Jukka Lehtosalo, PR [17904](https://github.com/python/mypy/pull/17904))
1974
+ * Fix union callees with `functools.partial` (Jukka Lehtosalo, PR [17903](https://github.com/python/mypy/pull/17903))
1975
+ * Improve handling of generic functions with `functools.partial` (Ivan Levkivskyi, PR [17925](https://github.com/python/mypy/pull/17925))
1976
+
1977
+ ### Typeshed Updates
1978
+
1979
+ Please see [git log](https://github.com/python/typeshed/commits/main?after=91a58b07cdd807b1d965e04ba85af2adab8bf924+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
1980
+
1981
+ ### Mypy 1.12.1
1982
+ * Fix crash when showing partially analyzed type in error message (Ivan Levkivskyi, PR [17961](https://github.com/python/mypy/pull/17961))
1983
+ * Fix iteration over union (when self type is involved) (Shantanu, PR [17976](https://github.com/python/mypy/pull/17976))
1984
+ * Fix type object with type var default in union context (Jukka Lehtosalo, PR [17991](https://github.com/python/mypy/pull/17991))
1985
+ * Revert change to `os.path` stubs affecting use of `os.PathLike[Any]` (Shantanu, PR [17995](https://github.com/python/mypy/pull/17995))
1986
+
1987
+ ### Acknowledgements
1988
+ Thanks to all mypy contributors who contributed to this release:
1989
+
1990
+ - Ali Hamdan
1991
+ - Anders Kaseorg
1992
+ - Bénédikt Tran
1993
+ - Brian Schubert
1994
+ - bzoracler
1995
+ - Chelsea Durazo
1996
+ - Danny Yang
1997
+ - Edgar Ramírez Mondragón
1998
+ - Eric Mark Martin
1999
+ - InSync
2000
+ - Ivan Levkivskyi
2001
+ - Jordandev678
2002
+ - Katrina Connors
2003
+ - Kirill Podoprigora
2004
+ - Marc Mueller
2005
+ - Max Muoto
2006
+ - Max Murin
2007
+ - Michael Carlstrom
2008
+ - Michael I Chen
2009
+ - Pradyun Gedam
2010
+ - quinn-sasha
2011
+ - Raphael Krupinski
2012
+ - Sebastian Rittau
2013
+ - Shantanu
2014
+ - sobolevn
2015
+ - Soubhik Kumar Mitra
2016
+ - Stanislav Terliakov
2017
+ - wyattscarpenter
2018
+
2019
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
2020
+
2021
+
2022
+ ## Mypy 1.11
2023
+
2024
+ We’ve just uploaded mypy 1.11 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
2025
+
2026
+ python3 -m pip install -U mypy
2027
+
2028
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
2029
+
2030
+ ### Support Python 3.12 Syntax for Generics (PEP 695)
2031
+
2032
+ Mypy now supports the new type parameter syntax introduced in Python 3.12 ([PEP 695](https://peps.python.org/pep-0695/)).
2033
+ This feature is still experimental and must be enabled with the `--enable-incomplete-feature=NewGenericSyntax` flag, or with `enable_incomplete_feature = NewGenericSyntax` in the mypy configuration file.
2034
+ We plan to enable this by default in the next mypy feature release.
2035
+
2036
+ This example demonstrates the new syntax:
2037
+
2038
+ ```python
2039
+ # Generic function
2040
+ def f[T](x: T) -> T: ...
2041
+
2042
+ reveal_type(f(1)) # Revealed type is 'int'
2043
+
2044
+ # Generic class
2045
+ class C[T]:
2046
+ def __init__(self, x: T) -> None:
2047
+ self.x = x
2048
+
2049
+ c = C('a')
2050
+ reveal_type(c.x) # Revealed type is 'str'
2051
+
2052
+ # Type alias
2053
+ type A[T] = C[list[T]]
2054
+ ```
2055
+
2056
+ This feature was contributed by Jukka Lehtosalo.
2057
+
2058
+
2059
+ ### Support for `functools.partial`
2060
+
2061
+ Mypy now type checks uses of `functools.partial`. Previously mypy would accept arbitrary arguments.
2062
+
2063
+ This example will now produce an error:
2064
+
2065
+ ```python
2066
+ from functools import partial
2067
+
2068
+ def f(a: int, b: str) -> None: ...
2069
+
2070
+ g = partial(f, 1)
2071
+
2072
+ # Argument has incompatible type "int"; expected "str"
2073
+ g(11)
2074
+ ```
2075
+
2076
+ This feature was contributed by Shantanu (PR [16939](https://github.com/python/mypy/pull/16939)).
2077
+
2078
+
2079
+ ### Stricter Checks for Untyped Overrides
2080
+
2081
+ Past mypy versions didn't check if untyped methods were compatible with overridden methods. This would result in false negatives. Now mypy performs these checks when using `--check-untyped-defs`.
2082
+
2083
+ For example, this now generates an error if using `--check-untyped-defs`:
2084
+
2085
+ ```python
2086
+ class Base:
2087
+ def f(self, x: int = 0) -> None: ...
2088
+
2089
+ class Derived(Base):
2090
+ # Signature incompatible with "Base"
2091
+ def f(self): ...
2092
+ ```
2093
+
2094
+ This feature was contributed by Steven Troxler (PR [17276](https://github.com/python/mypy/pull/17276)).
2095
+
2096
+
2097
+ ### Type Inference Improvements
2098
+
2099
+ The new polymorphic inference algorithm introduced in mypy 1.5 is now used in more situations. This improves type inference involving generic higher-order functions, in particular.
2100
+
2101
+ This feature was contributed by Ivan Levkivskyi (PR [17348](https://github.com/python/mypy/pull/17348)).
2102
+
2103
+ Mypy now uses unions of tuple item types in certain contexts to enable more precise inferred types. Example:
2104
+
2105
+ ```python
2106
+ for x in (1, 'x'):
2107
+ # Previously inferred as 'object'
2108
+ reveal_type(x) # Revealed type is 'int | str'
2109
+ ```
2110
+
2111
+ This was also contributed by Ivan Levkivskyi (PR [17408](https://github.com/python/mypy/pull/17408)).
2112
+
2113
+
2114
+ ### Improvements to Detection of Overlapping Overloads
2115
+
2116
+ The details of how mypy checks if two `@overload` signatures are unsafely overlapping were overhauled. This both fixes some false positives, and allows mypy to detect additional unsafe signatures.
2117
+
2118
+ This feature was contributed by Ivan Levkivskyi (PR [17392](https://github.com/python/mypy/pull/17392)).
2119
+
2120
+
2121
+ ### Better Support for Type Hints in Expressions
2122
+
2123
+ Mypy now allows more expressions that evaluate to valid type annotations in all expression contexts. The inferred types of these expressions are also sometimes more precise. Previously they were often `object`.
2124
+
2125
+ This example uses a union type that includes a callable type as an expression, and it no longer generates an error:
2126
+
2127
+ ```python
2128
+ from typing import Callable
2129
+
2130
+ print(Callable[[], int] | None) # No error
2131
+ ```
2132
+
2133
+ This feature was contributed by Jukka Lehtosalo (PR [17404](https://github.com/python/mypy/pull/17404)).
2134
+
2135
+
2136
+ ### Mypyc Improvements
2137
+
2138
+ Mypyc now supports the new syntax for generics introduced in Python 3.12 (see above). Another notable improvement is significantly faster basic operations on `int` values.
2139
+
2140
+ * Support Python 3.12 syntax for generic functions and classes (Jukka Lehtosalo, PR [17357](https://github.com/python/mypy/pull/17357))
2141
+ * Support Python 3.12 type alias syntax (Jukka Lehtosalo, PR [17384](https://github.com/python/mypy/pull/17384))
2142
+ * Fix ParamSpec (Shantanu, PR [17309](https://github.com/python/mypy/pull/17309))
2143
+ * Inline fast paths of integer unboxing operations (Jukka Lehtosalo, PR [17266](https://github.com/python/mypy/pull/17266))
2144
+ * Inline tagged integer arithmetic and bitwise operations (Jukka Lehtosalo, PR [17265](https://github.com/python/mypy/pull/17265))
2145
+ * Allow specifying primitives as pure (Jukka Lehtosalo, PR [17263](https://github.com/python/mypy/pull/17263))
2146
+
2147
+
2148
+ ### Changes to Stubtest
2149
+ * Ignore `_ios_support` (Alex Waygood, PR [17270](https://github.com/python/mypy/pull/17270))
2150
+ * Improve support for Python 3.13 (Shantanu, PR [17261](https://github.com/python/mypy/pull/17261))
2151
+
2152
+
2153
+ ### Changes to Stubgen
2154
+ * Gracefully handle invalid `Optional` and recognize aliases to PEP 604 unions (Ali Hamdan, PR [17386](https://github.com/python/mypy/pull/17386))
2155
+ * Fix for Python 3.13 (Jelle Zijlstra, PR [17290](https://github.com/python/mypy/pull/17290))
2156
+ * Preserve enum value initialisers (Shantanu, PR [17125](https://github.com/python/mypy/pull/17125))
2157
+
2158
+
2159
+ ### Miscellaneous New Features
2160
+ * Add error format support and JSON output option via `--output json` (Tushar Sadhwani, PR [11396](https://github.com/python/mypy/pull/11396))
2161
+ * Support `enum.member` in Python 3.11+ (Nikita Sobolev, PR [17382](https://github.com/python/mypy/pull/17382))
2162
+ * Support `enum.nonmember` in Python 3.11+ (Nikita Sobolev, PR [17376](https://github.com/python/mypy/pull/17376))
2163
+ * Support `namedtuple.__replace__` in Python 3.13 (Shantanu, PR [17259](https://github.com/python/mypy/pull/17259))
2164
+ * Support `rename=True` in collections.namedtuple (Jelle Zijlstra, PR [17247](https://github.com/python/mypy/pull/17247))
2165
+ * Add support for `__spec__` (Shantanu, PR [14739](https://github.com/python/mypy/pull/14739))
2166
+
2167
+
2168
+ ### Changes to Error Reporting
2169
+ * Mention `--enable-incomplete-feature=NewGenericSyntax` in messages (Shantanu, PR [17462](https://github.com/python/mypy/pull/17462))
2170
+ * Do not report plugin-generated methods with `explicit-override` (sobolevn, PR [17433](https://github.com/python/mypy/pull/17433))
2171
+ * Use and display namespaces for function type variables (Ivan Levkivskyi, PR [17311](https://github.com/python/mypy/pull/17311))
2172
+ * Fix false positive for Final local scope variable in Protocol (GiorgosPapoutsakis, PR [17308](https://github.com/python/mypy/pull/17308))
2173
+ * Use Never in more messages, use ambiguous in join (Shantanu, PR [17304](https://github.com/python/mypy/pull/17304))
2174
+ * Log full path to config file in verbose output (dexterkennedy, PR [17180](https://github.com/python/mypy/pull/17180))
2175
+ * Added `[prop-decorator]` code for unsupported property decorators (#14461) (Christopher Barber, PR [16571](https://github.com/python/mypy/pull/16571))
2176
+ * Suppress second error message with `:=` and `[truthy-bool]` (Nikita Sobolev, PR [15941](https://github.com/python/mypy/pull/15941))
2177
+ * Generate error for assignment of functional Enum to variable of different name (Shantanu, PR [16805](https://github.com/python/mypy/pull/16805))
2178
+ * Fix error reporting on cached run after uninstallation of third party library (Shantanu, PR [17420](https://github.com/python/mypy/pull/17420))
2179
+
2180
+
2181
+ ### Fixes for Crashes
2182
+ * Fix daemon crash on invalid type in TypedDict (Ivan Levkivskyi, PR [17495](https://github.com/python/mypy/pull/17495))
2183
+ * Fix crash and bugs related to `partial()` (Ivan Levkivskyi, PR [17423](https://github.com/python/mypy/pull/17423))
2184
+ * Fix crash when overriding with unpacked TypedDict (Ivan Levkivskyi, PR [17359](https://github.com/python/mypy/pull/17359))
2185
+ * Fix crash on TypedDict unpacking for ParamSpec (Ivan Levkivskyi, PR [17358](https://github.com/python/mypy/pull/17358))
2186
+ * Fix crash involving recursive union of tuples (Ivan Levkivskyi, PR [17353](https://github.com/python/mypy/pull/17353))
2187
+ * Fix crash on invalid callable property override (Ivan Levkivskyi, PR [17352](https://github.com/python/mypy/pull/17352))
2188
+ * Fix crash on unpacking self in NamedTuple (Ivan Levkivskyi, PR [17351](https://github.com/python/mypy/pull/17351))
2189
+ * Fix crash on recursive alias with an optional type (Ivan Levkivskyi, PR [17350](https://github.com/python/mypy/pull/17350))
2190
+ * Fix crash on type comment inside generic definitions (Bénédikt Tran, PR [16849](https://github.com/python/mypy/pull/16849))
2191
+
2192
+
2193
+ ### Changes to Documentation
2194
+ * Use inline config in documentation for optional error codes (Shantanu, PR [17374](https://github.com/python/mypy/pull/17374))
2195
+ * Use lower-case generics in documentation (Seo Sanghyeon, PR [17176](https://github.com/python/mypy/pull/17176))
2196
+ * Add documentation for show-error-code-links (GiorgosPapoutsakis, PR [17144](https://github.com/python/mypy/pull/17144))
2197
+ * Update CONTRIBUTING.md to include commands for Windows (GiorgosPapoutsakis, PR [17142](https://github.com/python/mypy/pull/17142))
2198
+
2199
+
2200
+ ### Other Notable Improvements and Fixes
2201
+ * Fix ParamSpec inference against TypeVarTuple (Ivan Levkivskyi, PR [17431](https://github.com/python/mypy/pull/17431))
2202
+ * Fix explicit type for `partial` (Ivan Levkivskyi, PR [17424](https://github.com/python/mypy/pull/17424))
2203
+ * Always allow lambda calls (Ivan Levkivskyi, PR [17430](https://github.com/python/mypy/pull/17430))
2204
+ * Fix isinstance checks with PEP 604 unions containing None (Shantanu, PR [17415](https://github.com/python/mypy/pull/17415))
2205
+ * Fix self-referential upper bound in new-style type variables (Ivan Levkivskyi, PR [17407](https://github.com/python/mypy/pull/17407))
2206
+ * Consider overlap between instances and callables (Ivan Levkivskyi, PR [17389](https://github.com/python/mypy/pull/17389))
2207
+ * Allow new-style self-types in classmethods (Ivan Levkivskyi, PR [17381](https://github.com/python/mypy/pull/17381))
2208
+ * Fix isinstance with type aliases to PEP 604 unions (Shantanu, PR [17371](https://github.com/python/mypy/pull/17371))
2209
+ * Properly handle unpacks in overlap checks (Ivan Levkivskyi, PR [17356](https://github.com/python/mypy/pull/17356))
2210
+ * Fix type application for classes with generic constructors (Ivan Levkivskyi, PR [17354](https://github.com/python/mypy/pull/17354))
2211
+ * Update `typing_extensions` to >=4.6.0 to fix Python 3.12 error (Ben Brown, PR [17312](https://github.com/python/mypy/pull/17312))
2212
+ * Avoid "does not return" error in lambda (Shantanu, PR [17294](https://github.com/python/mypy/pull/17294))
2213
+ * Fix bug with descriptors in non-strict-optional mode (Max Murin, PR [17293](https://github.com/python/mypy/pull/17293))
2214
+ * Don’t leak unreachability from lambda body to surrounding scope (Anders Kaseorg, PR [17287](https://github.com/python/mypy/pull/17287))
2215
+ * Fix issues with non-ASCII characters on Windows (Alexander Leopold Shon, PR [17275](https://github.com/python/mypy/pull/17275))
2216
+ * Fix for type narrowing of negative integer literals (gilesgc, PR [17256](https://github.com/python/mypy/pull/17256))
2217
+ * Fix confusion between .py and .pyi files in mypy daemon (Valentin Stanciu, PR [17245](https://github.com/python/mypy/pull/17245))
2218
+ * Fix type of `tuple[X, Y]` expression (urnest, PR [17235](https://github.com/python/mypy/pull/17235))
2219
+ * Don't forget that a `TypedDict` was wrapped in `Unpack` after a `name-defined` error occurred (Christoph Tyralla, PR [17226](https://github.com/python/mypy/pull/17226))
2220
+ * Mark annotated argument as having an explicit, not inferred type (bzoracler, PR [17217](https://github.com/python/mypy/pull/17217))
2221
+ * Don't consider Enum private attributes as enum members (Ali Hamdan, PR [17182](https://github.com/python/mypy/pull/17182))
2222
+ * Fix Literal strings containing pipe characters (Jelle Zijlstra, PR [17148](https://github.com/python/mypy/pull/17148))
2223
+
2224
+
2225
+ ### Typeshed Updates
2226
+
2227
+ Please see [git log](https://github.com/python/typeshed/commits/main?after=6dda799d8ad1d89e0f8aad7ac41d2d34bd838ace+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
2228
+
2229
+ ### Mypy 1.11.1
2230
+ * Fix `RawExpressionType.accept` crash with `--cache-fine-grained` (Anders Kaseorg, PR [17588](https://github.com/python/mypy/pull/17588))
2231
+ * Fix PEP 604 isinstance caching (Shantanu, PR [17563](https://github.com/python/mypy/pull/17563))
2232
+ * Fix `typing.TypeAliasType` being undefined on python < 3.12 (Nikita Sobolev, PR [17558](https://github.com/python/mypy/pull/17558))
2233
+ * Fix `types.GenericAlias` lookup crash (Shantanu, PR [17543](https://github.com/python/mypy/pull/17543))
2234
+
2235
+ ### Mypy 1.11.2
2236
+ * Alternative fix for a union-like literal string (Ivan Levkivskyi, PR [17639](https://github.com/python/mypy/pull/17639))
2237
+ * Unwrap `TypedDict` item types before storing (Ivan Levkivskyi, PR [17640](https://github.com/python/mypy/pull/17640))
2238
+
2239
+ ### Acknowledgements
2240
+ Thanks to all mypy contributors who contributed to this release:
2241
+
2242
+ - Alex Waygood
2243
+ - Alexander Leopold Shon
2244
+ - Ali Hamdan
2245
+ - Anders Kaseorg
2246
+ - Ben Brown
2247
+ - Bénédikt Tran
2248
+ - bzoracler
2249
+ - Christoph Tyralla
2250
+ - Christopher Barber
2251
+ - dexterkennedy
2252
+ - gilesgc
2253
+ - GiorgosPapoutsakis
2254
+ - Ivan Levkivskyi
2255
+ - Jelle Zijlstra
2256
+ - Jukka Lehtosalo
2257
+ - Marc Mueller
2258
+ - Matthieu Devlin
2259
+ - Michael R. Crusoe
2260
+ - Nikita Sobolev
2261
+ - Seo Sanghyeon
2262
+ - Shantanu
2263
+ - sobolevn
2264
+ - Steven Troxler
2265
+ - Tadeu Manoel
2266
+ - Tamir Duberstein
2267
+ - Tushar Sadhwani
2268
+ - urnest
2269
+ - Valentin Stanciu
2270
+
2271
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
2272
+
2273
+
2274
+ ## Mypy 1.10
2275
+
2276
+ We’ve just uploaded mypy 1.10 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
2277
+
2278
+ python3 -m pip install -U mypy
2279
+
2280
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
2281
+
2282
+ ### Support TypeIs (PEP 742)
2283
+
2284
+ Mypy now supports `TypeIs` ([PEP 742](https://peps.python.org/pep-0742/)), which allows
2285
+ functions to narrow the type of a value, similar to `isinstance()`. Unlike `TypeGuard`,
2286
+ `TypeIs` can narrow in both the `if` and `else` branches of an if statement:
2287
+
2288
+ ```python
2289
+ from typing_extensions import TypeIs
2290
+
2291
+ def is_str(s: object) -> TypeIs[str]:
2292
+ return isinstance(s, str)
2293
+
2294
+ def f(o: str | int) -> None:
2295
+ if is_str(o):
2296
+ # Type of o is 'str'
2297
+ ...
2298
+ else:
2299
+ # Type of o is 'int'
2300
+ ...
2301
+ ```
2302
+
2303
+ `TypeIs` will be added to the `typing` module in Python 3.13, but it
2304
+ can be used on earlier Python versions by importing it from
2305
+ `typing_extensions`.
2306
+
2307
+ This feature was contributed by Jelle Zijlstra (PR [16898](https://github.com/python/mypy/pull/16898)).
2308
+
2309
+ ### Support TypeVar Defaults (PEP 696)
2310
+
2311
+ [PEP 696](https://peps.python.org/pep-0696/) adds support for type parameter defaults.
2312
+ Example:
2313
+
2314
+ ```python
2315
+ from typing import Generic
2316
+ from typing_extensions import TypeVar
2317
+
2318
+ T = TypeVar("T", default=int)
2319
+
2320
+ class C(Generic[T]):
2321
+ ...
2322
+
2323
+ x: C = ...
2324
+ y: C[str] = ...
2325
+ reveal_type(x) # C[int], because of the default
2326
+ reveal_type(y) # C[str]
2327
+ ```
2328
+
2329
+ TypeVar defaults will be added to the `typing` module in Python 3.13, but they
2330
+ can be used with earlier Python releases by importing `TypeVar` from
2331
+ `typing_extensions`.
2332
+
2333
+ This feature was contributed by Marc Mueller (PR [16878](https://github.com/python/mypy/pull/16878)
2334
+ and PR [16925](https://github.com/python/mypy/pull/16925)).
2335
+
2336
+ ### Support TypeAliasType (PEP 695)
2337
+ As part of the initial steps towards implementing [PEP 695](https://peps.python.org/pep-0695/), mypy now supports `TypeAliasType`.
2338
+ `TypeAliasType` provides a backport of the new `type` statement in Python 3.12.
2339
+
2340
+ ```python
2341
+ type ListOrSet[T] = list[T] | set[T]
2342
+ ```
2343
+
2344
+ is equivalent to:
2345
+
2346
+ ```python
2347
+ T = TypeVar("T")
2348
+ ListOrSet = TypeAliasType("ListOrSet", list[T] | set[T], type_params=(T,))
2349
+ ```
2350
+
2351
+ Example of use in mypy:
2352
+
2353
+ ```python
2354
+ from typing_extensions import TypeAliasType, TypeVar
2355
+
2356
+ NewUnionType = TypeAliasType("NewUnionType", int | str)
2357
+ x: NewUnionType = 42
2358
+ y: NewUnionType = 'a'
2359
+ z: NewUnionType = object() # error: Incompatible types in assignment (expression has type "object", variable has type "int | str") [assignment]
2360
+
2361
+ T = TypeVar("T")
2362
+ ListOrSet = TypeAliasType("ListOrSet", list[T] | set[T], type_params=(T,))
2363
+ a: ListOrSet[int] = [1, 2]
2364
+ b: ListOrSet[str] = {'a', 'b'}
2365
+ c: ListOrSet[str] = 'test' # error: Incompatible types in assignment (expression has type "str", variable has type "list[str] | set[str]") [assignment]
2366
+ ```
2367
+
2368
+ `TypeAliasType` was added to the `typing` module in Python 3.12, but it can be used with earlier Python releases by importing from `typing_extensions`.
2369
+
2370
+ This feature was contributed by Ali Hamdan (PR [16926](https://github.com/python/mypy/pull/16926), PR [17038](https://github.com/python/mypy/pull/17038) and PR [17053](https://github.com/python/mypy/pull/17053))
2371
+
2372
+ ### Detect Additional Unsafe Uses of super()
2373
+
2374
+ Mypy will reject unsafe uses of `super()` more consistently, when the target has a
2375
+ trivial (empty) body. Example:
2376
+
2377
+ ```python
2378
+ class Proto(Protocol):
2379
+ def method(self) -> int: ...
2380
+
2381
+ class Sub(Proto):
2382
+ def method(self) -> int:
2383
+ return super().meth() # Error (unsafe)
2384
+ ```
2385
+
2386
+ This feature was contributed by Shantanu (PR [16756](https://github.com/python/mypy/pull/16756)).
2387
+
2388
+ ### Stubgen Improvements
2389
+ - Preserve empty tuple annotation (Ali Hamdan, PR [16907](https://github.com/python/mypy/pull/16907))
2390
+ - Add support for PEP 570 positional-only parameters (Ali Hamdan, PR [16904](https://github.com/python/mypy/pull/16904))
2391
+ - Replace obsolete typing aliases with builtin containers (Ali Hamdan, PR [16780](https://github.com/python/mypy/pull/16780))
2392
+ - Fix generated dataclass `__init__` signature (Ali Hamdan, PR [16906](https://github.com/python/mypy/pull/16906))
2393
+
2394
+ ### Mypyc Improvements
2395
+
2396
+ - Provide an easier way to define IR-to-IR transforms (Jukka Lehtosalo, PR [16998](https://github.com/python/mypy/pull/16998))
2397
+ - Implement lowering pass and add primitives for int (in)equality (Jukka Lehtosalo, PR [17027](https://github.com/python/mypy/pull/17027))
2398
+ - Implement lowering for remaining tagged integer comparisons (Jukka Lehtosalo, PR [17040](https://github.com/python/mypy/pull/17040))
2399
+ - Optimize away some bool/bit registers (Jukka Lehtosalo, PR [17022](https://github.com/python/mypy/pull/17022))
2400
+ - Remangle redefined names produced by async with (Richard Si, PR [16408](https://github.com/python/mypy/pull/16408))
2401
+ - Optimize TYPE_CHECKING to False at Runtime (Srinivas Lade, PR [16263](https://github.com/python/mypy/pull/16263))
2402
+ - Fix compilation of unreachable comprehensions (Richard Si, PR [15721](https://github.com/python/mypy/pull/15721))
2403
+ - Don't crash on non-inlinable final local reads (Richard Si, PR [15719](https://github.com/python/mypy/pull/15719))
2404
+
2405
+ ### Documentation Improvements
2406
+ - Import `TypedDict` from `typing` instead of `typing_extensions` (Riccardo Di Maio, PR [16958](https://github.com/python/mypy/pull/16958))
2407
+ - Add missing `mutable-override` to section title (James Braza, PR [16886](https://github.com/python/mypy/pull/16886))
2408
+
2409
+ ### Error Reporting Improvements
2410
+
2411
+ - Use lower-case generics more consistently in error messages (Jukka Lehtosalo, PR [17035](https://github.com/python/mypy/pull/17035))
2412
+
2413
+ ### Other Notable Changes and Fixes
2414
+ - Fix incorrect inferred type when accessing descriptor on union type (Matthieu Devlin, PR [16604](https://github.com/python/mypy/pull/16604))
2415
+ - Fix crash when expanding invalid `Unpack` in a `Callable` alias (Ali Hamdan, PR [17028](https://github.com/python/mypy/pull/17028))
2416
+ - Fix false positive when string formatting with string enum (roberfi, PR [16555](https://github.com/python/mypy/pull/16555))
2417
+ - Narrow individual items when matching a tuple to a sequence pattern (Loïc Simon, PR [16905](https://github.com/python/mypy/pull/16905))
2418
+ - Fix false positive from type variable within TypeGuard or TypeIs (Evgeniy Slobodkin, PR [17071](https://github.com/python/mypy/pull/17071))
2419
+ - Improve `yield from` inference for unions of generators (Shantanu, PR [16717](https://github.com/python/mypy/pull/16717))
2420
+ - Fix emulating hash method logic in `attrs` classes (Hashem, PR [17016](https://github.com/python/mypy/pull/17016))
2421
+ - Add reverted typeshed commit that uses `ParamSpec` for `functools.wraps` (Tamir Duberstein, PR [16942](https://github.com/python/mypy/pull/16942))
2422
+ - Fix type narrowing for `types.EllipsisType` (Shantanu, PR [17003](https://github.com/python/mypy/pull/17003))
2423
+ - Fix single item enum match type exhaustion (Oskari Lehto, PR [16966](https://github.com/python/mypy/pull/16966))
2424
+ - Improve type inference with empty collections (Marc Mueller, PR [16994](https://github.com/python/mypy/pull/16994))
2425
+ - Fix override checking for decorated property (Shantanu, PR [16856](https://github.com/python/mypy/pull/16856))
2426
+ - Fix narrowing on match with function subject (Edward Paget, PR [16503](https://github.com/python/mypy/pull/16503))
2427
+ - Allow `+N` within `Literal[...]` (Spencer Brown, PR [16910](https://github.com/python/mypy/pull/16910))
2428
+ - Experimental: Support TypedDict within `type[...]` (Marc Mueller, PR [16963](https://github.com/python/mypy/pull/16963))
2429
+ - Experimtental: Fix issue with TypedDict with optional keys in `type[...]` (Marc Mueller, PR [17068](https://github.com/python/mypy/pull/17068))
2430
+
2431
+ ### Typeshed Updates
2432
+
2433
+ Please see [git log](https://github.com/python/typeshed/commits/main?after=6dda799d8ad1d89e0f8aad7ac41d2d34bd838ace+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
2434
+
2435
+ ### Mypy 1.10.1
2436
+
2437
+ - Fix error reporting on cached run after uninstallation of third party library (Shantanu, PR [17420](https://github.com/python/mypy/pull/17420))
2438
+
2439
+ ### Acknowledgements
2440
+ Thanks to all mypy contributors who contributed to this release:
2441
+
2442
+ - Alex Waygood
2443
+ - Ali Hamdan
2444
+ - Edward Paget
2445
+ - Evgeniy Slobodkin
2446
+ - Hashem
2447
+ - hesam
2448
+ - Hugo van Kemenade
2449
+ - Ihor
2450
+ - James Braza
2451
+ - Jelle Zijlstra
2452
+ - jhance
2453
+ - Jukka Lehtosalo
2454
+ - Loïc Simon
2455
+ - Marc Mueller
2456
+ - Matthieu Devlin
2457
+ - Michael R. Crusoe
2458
+ - Nikita Sobolev
2459
+ - Oskari Lehto
2460
+ - Riccardo Di Maio
2461
+ - Richard Si
2462
+ - roberfi
2463
+ - Roman Solomatin
2464
+ - Sam Xifaras
2465
+ - Shantanu
2466
+ - Spencer Brown
2467
+ - Srinivas Lade
2468
+ - Tamir Duberstein
2469
+ - youkaichao
2470
+
2471
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
2472
+
2473
+
2474
+ ## Mypy 1.9
2475
+
2476
+ We’ve just uploaded mypy 1.9 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
2477
+
2478
+ python3 -m pip install -U mypy
2479
+
2480
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
2481
+
2482
+ ### Breaking Changes
2483
+
2484
+ Because the version of typeshed we use in mypy 1.9 doesn't support 3.7, neither does mypy 1.9. (Jared Hance, PR [16883](https://github.com/python/mypy/pull/16883))
2485
+
2486
+ We are planning to enable
2487
+ [local partial types](https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-local-partial-types) (enabled via the
2488
+ `--local-partial-types` flag) later this year by default. This change
2489
+ was announced years ago, but now it's finally happening. This is a
2490
+ major backward-incompatible change, so we'll probably include it as
2491
+ part of the upcoming mypy 2.0 release. This makes daemon and
2492
+ non-daemon mypy runs have the same behavior by default.
2493
+
2494
+ Local partial types can also be enabled in the mypy config file:
2495
+ ```
2496
+ local_partial_types = True
2497
+ ```
2498
+
2499
+ We are looking at providing a tool to make it easier to migrate
2500
+ projects to use `--local-partial-types`, but it's not yet clear whether
2501
+ this is practical. The migration usually involves adding some
2502
+ explicit type annotations to module-level and class-level variables.
2503
+
2504
+ ### Basic Support for Type Parameter Defaults (PEP 696)
2505
+
2506
+ This release contains new experimental support for type parameter
2507
+ defaults ([PEP 696](https://peps.python.org/pep-0696)). Please try it
2508
+ out! This feature was contributed by Marc Mueller.
2509
+
2510
+ Since this feature will be officially introduced in the next Python
2511
+ feature release (3.13), you will need to import `TypeVar`, `ParamSpec`
2512
+ or `TypeVarTuple` from `typing_extensions` to use defaults for now.
2513
+
2514
+ This example adapted from the PEP defines a default for `BotT`:
2515
+ ```python
2516
+ from typing import Generic
2517
+ from typing_extensions import TypeVar
2518
+
2519
+ class Bot: ...
2520
+
2521
+ BotT = TypeVar("BotT", bound=Bot, default=Bot)
2522
+
2523
+ class Context(Generic[BotT]):
2524
+ bot: BotT
2525
+
2526
+ class MyBot(Bot): ...
2527
+
2528
+ # type is Bot (the default)
2529
+ reveal_type(Context().bot)
2530
+ # type is MyBot
2531
+ reveal_type(Context[MyBot]().bot)
2532
+ ```
2533
+
2534
+ ### Type-checking Improvements
2535
+ * Fix missing type store for overloads (Marc Mueller, PR [16803](https://github.com/python/mypy/pull/16803))
2536
+ * Fix `'WriteToConn' object has no attribute 'flush'` (Charlie Denton, PR [16801](https://github.com/python/mypy/pull/16801))
2537
+ * Improve TypeAlias error messages (Marc Mueller, PR [16831](https://github.com/python/mypy/pull/16831))
2538
+ * Support narrowing unions that include `type[None]` (Christoph Tyralla, PR [16315](https://github.com/python/mypy/pull/16315))
2539
+ * Support TypedDict functional syntax as class base type (anniel-stripe, PR [16703](https://github.com/python/mypy/pull/16703))
2540
+ * Accept multiline quoted annotations (Shantanu, PR [16765](https://github.com/python/mypy/pull/16765))
2541
+ * Allow unary + in `Literal` (Jelle Zijlstra, PR [16729](https://github.com/python/mypy/pull/16729))
2542
+ * Substitute type variables in return type of static methods (Kouroche Bouchiat, PR [16670](https://github.com/python/mypy/pull/16670))
2543
+ * Consider TypeVarTuple to be invariant (Marc Mueller, PR [16759](https://github.com/python/mypy/pull/16759))
2544
+ * Add `alias` support to `field()` in `attrs` plugin (Nikita Sobolev, PR [16610](https://github.com/python/mypy/pull/16610))
2545
+ * Improve attrs hashability detection (Tin Tvrtković, PR [16556](https://github.com/python/mypy/pull/16556))
2546
+
2547
+ ### Performance Improvements
2548
+
2549
+ * Speed up finding function type variables (Jukka Lehtosalo, PR [16562](https://github.com/python/mypy/pull/16562))
2550
+
2551
+ ### Documentation Updates
2552
+
2553
+ * Document supported values for `--enable-incomplete-feature` in "mypy --help" (Froger David, PR [16661](https://github.com/python/mypy/pull/16661))
2554
+ * Update new type system discussion links (thomaswhaley, PR [16841](https://github.com/python/mypy/pull/16841))
2555
+ * Add missing class instantiation to cheat sheet (Aleksi Tarvainen, PR [16817](https://github.com/python/mypy/pull/16817))
2556
+ * Document how evil `--no-strict-optional` is (Shantanu, PR [16731](https://github.com/python/mypy/pull/16731))
2557
+ * Improve mypy daemon documentation note about local partial types (Makonnen Makonnen, PR [16782](https://github.com/python/mypy/pull/16782))
2558
+ * Fix numbering error (Stefanie Molin, PR [16838](https://github.com/python/mypy/pull/16838))
2559
+ * Various documentation improvements (Shantanu, PR [16836](https://github.com/python/mypy/pull/16836))
2560
+
2561
+ ### Stubtest Improvements
2562
+ * Ignore private function/method parameters when they are missing from the stub (private parameter names start with a single underscore and have a default) (PR [16507](https://github.com/python/mypy/pull/16507))
2563
+ * Ignore a new protocol dunder (Alex Waygood, PR [16895](https://github.com/python/mypy/pull/16895))
2564
+ * Private parameters can be omitted (Sebastian Rittau, PR [16507](https://github.com/python/mypy/pull/16507))
2565
+ * Add support for setting enum members to "..." (Jelle Zijlstra, PR [16807](https://github.com/python/mypy/pull/16807))
2566
+ * Adjust symbol table logic (Shantanu, PR [16823](https://github.com/python/mypy/pull/16823))
2567
+ * Fix posisitional-only handling in overload resolution (Shantanu, PR [16750](https://github.com/python/mypy/pull/16750))
2568
+
2569
+ ### Stubgen Improvements
2570
+ * Fix crash on star unpack of TypeVarTuple (Ali Hamdan, PR [16869](https://github.com/python/mypy/pull/16869))
2571
+ * Use PEP 604 unions everywhere (Ali Hamdan, PR [16519](https://github.com/python/mypy/pull/16519))
2572
+ * Do not ignore property deleter (Ali Hamdan, PR [16781](https://github.com/python/mypy/pull/16781))
2573
+ * Support type stub generation for `staticmethod` (WeilerMarcel, PR [14934](https://github.com/python/mypy/pull/14934))
2574
+
2575
+ ### Acknowledgements
2576
+
2577
+ ​Thanks to all mypy contributors who contributed to this release:
2578
+
2579
+ - Aleksi Tarvainen
2580
+ - Alex Waygood
2581
+ - Ali Hamdan
2582
+ - anniel-stripe
2583
+ - Charlie Denton
2584
+ - Christoph Tyralla
2585
+ - Dheeraj
2586
+ - Fabian Keller
2587
+ - Fabian Lewis
2588
+ - Froger David
2589
+ - Ihor
2590
+ - Jared Hance
2591
+ - Jelle Zijlstra
2592
+ - Jukka Lehtosalo
2593
+ - Kouroche Bouchiat
2594
+ - Lukas Geiger
2595
+ - Maarten Huijsmans
2596
+ - Makonnen Makonnen
2597
+ - Marc Mueller
2598
+ - Nikita Sobolev
2599
+ - Sebastian Rittau
2600
+ - Shantanu
2601
+ - Stefanie Molin
2602
+ - Stephen Morton
2603
+ - thomaswhaley
2604
+ - Tin Tvrtković
2605
+ - WeilerMarcel
2606
+ - Wesley Collin Wright
2607
+ - zipperer
2608
+
2609
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
2610
+
2611
+ ## Mypy 1.8
2612
+
2613
+ We’ve just uploaded mypy 1.8 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
2614
+
2615
+ python3 -m pip install -U mypy
2616
+
2617
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
2618
+
2619
+ ### Type-checking Improvements
2620
+ * Do not intersect types in isinstance checks if at least one is final (Christoph Tyralla, PR [16330](https://github.com/python/mypy/pull/16330))
2621
+ * Detect that `@final` class without `__bool__` cannot have falsey instances (Ilya Priven, PR [16566](https://github.com/python/mypy/pull/16566))
2622
+ * Do not allow `TypedDict` classes with extra keywords (Nikita Sobolev, PR [16438](https://github.com/python/mypy/pull/16438))
2623
+ * Do not allow class-level keywords for `NamedTuple` (Nikita Sobolev, PR [16526](https://github.com/python/mypy/pull/16526))
2624
+ * Make imprecise constraints handling more robust (Ivan Levkivskyi, PR [16502](https://github.com/python/mypy/pull/16502))
2625
+ * Fix strict-optional in extending generic TypedDict (Ivan Levkivskyi, PR [16398](https://github.com/python/mypy/pull/16398))
2626
+ * Allow type ignores of PEP 695 constructs (Shantanu, PR [16608](https://github.com/python/mypy/pull/16608))
2627
+ * Enable `type_check_only` support for `TypedDict` and `NamedTuple` (Nikita Sobolev, PR [16469](https://github.com/python/mypy/pull/16469))
2628
+
2629
+ ### Performance Improvements
2630
+ * Add fast path to analyzing special form assignments (Jukka Lehtosalo, PR [16561](https://github.com/python/mypy/pull/16561))
2631
+
2632
+ ### Improvements to Error Reporting
2633
+ * Don't show documentation links for plugin error codes (Ivan Levkivskyi, PR [16383](https://github.com/python/mypy/pull/16383))
2634
+ * Improve error messages for `super` checks and add more tests (Nikita Sobolev, PR [16393](https://github.com/python/mypy/pull/16393))
2635
+ * Add error code for mutable covariant override (Ivan Levkivskyi, PR [16399](https://github.com/python/mypy/pull/16399))
2636
+
2637
+ ### Stubgen Improvements
2638
+ * Preserve simple defaults in function signatures (Ali Hamdan, PR [15355](https://github.com/python/mypy/pull/15355))
2639
+ * Include `__all__` in output (Jelle Zijlstra, PR [16356](https://github.com/python/mypy/pull/16356))
2640
+ * Fix stubgen regressions with pybind11 and mypy 1.7 (Chad Dombrova, PR [16504](https://github.com/python/mypy/pull/16504))
2641
+
2642
+ ### Stubtest Improvements
2643
+ * Improve handling of unrepresentable defaults (Jelle Zijlstra, PR [16433](https://github.com/python/mypy/pull/16433))
2644
+ * Print more helpful errors if a function is missing from stub (Alex Waygood, PR [16517](https://github.com/python/mypy/pull/16517))
2645
+ * Support `@type_check_only` decorator (Nikita Sobolev, PR [16422](https://github.com/python/mypy/pull/16422))
2646
+ * Warn about missing `__del__` (Shantanu, PR [16456](https://github.com/python/mypy/pull/16456))
2647
+ * Fix crashes with some uses of `final` and `deprecated` (Shantanu, PR [16457](https://github.com/python/mypy/pull/16457))
2648
+
2649
+ ### Fixes to Crashes
2650
+ * Fix crash with type alias to `Callable[[Unpack[Tuple[Any, ...]]], Any]` (Alex Waygood, PR [16541](https://github.com/python/mypy/pull/16541))
2651
+ * Fix crash on TypeGuard in `__call__` (Ivan Levkivskyi, PR [16516](https://github.com/python/mypy/pull/16516))
2652
+ * Fix crash on invalid enum in method (Ivan Levkivskyi, PR [16511](https://github.com/python/mypy/pull/16511))
2653
+ * Fix crash on unimported Any in TypedDict (Ivan Levkivskyi, PR [16510](https://github.com/python/mypy/pull/16510))
2654
+
2655
+ ### Documentation Updates
2656
+ * Update soft-error-limit default value to -1 (Sveinung Gundersen, PR [16542](https://github.com/python/mypy/pull/16542))
2657
+ * Support Sphinx 7.x (Michael R. Crusoe, PR [16460](https://github.com/python/mypy/pull/16460))
2658
+
2659
+ ### Other Notable Changes and Fixes
2660
+ * Allow mypy to output a junit file with per-file results (Matthew Wright, PR [16388](https://github.com/python/mypy/pull/16388))
2661
+
2662
+ ### Typeshed Updates
2663
+
2664
+ Please see [git log](https://github.com/python/typeshed/commits/main?after=4a854366e03dee700109f8e758a08b2457ea2f51+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
2665
+
2666
+ ### Acknowledgements
2667
+
2668
+ ​Thanks to all mypy contributors who contributed to this release:
2669
+
2670
+ - Alex Waygood
2671
+ - Ali Hamdan
2672
+ - Chad Dombrova
2673
+ - Christoph Tyralla
2674
+ - Ilya Priven
2675
+ - Ivan Levkivskyi
2676
+ - Jelle Zijlstra
2677
+ - Jukka Lehtosalo
2678
+ - Marcel Telka
2679
+ - Matthew Wright
2680
+ - Michael R. Crusoe
2681
+ - Nikita Sobolev
2682
+ - Ole Peder Brandtzæg
2683
+ - robjhornby
2684
+ - Shantanu
2685
+ - Sveinung Gundersen
2686
+ - Valentin Stanciu
2687
+
2688
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
2689
+
2690
+ Posted by Wesley Collin Wright
2691
+
2692
+ ## Mypy 1.7
2693
+
2694
+ We’ve just uploaded mypy 1.7 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
2695
+
2696
+ python3 -m pip install -U mypy
2697
+
2698
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
2699
+
2700
+ ### Using TypedDict for `**kwargs` Typing
2701
+
2702
+ Mypy now has support for using `Unpack[...]` with a TypedDict type to annotate `**kwargs` arguments enabled by default. Example:
2703
+
2704
+ ```python
2705
+ # Or 'from typing_extensions import ...'
2706
+ from typing import TypedDict, Unpack
2707
+
2708
+ class Person(TypedDict):
2709
+ name: str
2710
+ age: int
2711
+
2712
+ def foo(**kwargs: Unpack[Person]) -> None:
2713
+ ...
2714
+
2715
+ foo(name="x", age=1) # Ok
2716
+ foo(name=1) # Error
2717
+ ```
2718
+
2719
+ The definition of `foo` above is equivalent to the one below, with keyword-only arguments `name` and `age`:
2720
+
2721
+ ```python
2722
+ def foo(*, name: str, age: int) -> None:
2723
+ ...
2724
+ ```
2725
+
2726
+ Refer to [PEP 692](https://peps.python.org/pep-0692/) for more information. Note that unlike in the current version of the PEP, mypy always treats signatures with `Unpack[SomeTypedDict]` as equivalent to their expanded forms with explicit keyword arguments, and there aren't special type checking rules for TypedDict arguments.
2727
+
2728
+ This was contributed by Ivan Levkivskyi back in 2022 (PR [13471](https://github.com/python/mypy/pull/13471)).
2729
+
2730
+ ### TypeVarTuple Support Enabled (Experimental)
2731
+
2732
+ Mypy now has support for variadic generics (TypeVarTuple) enabled by default, as an experimental feature. Refer to [PEP 646](https://peps.python.org/pep-0646/) for the details.
2733
+
2734
+ TypeVarTuple was implemented by Jared Hance and Ivan Levkivskyi over several mypy releases, with help from Jukka Lehtosalo.
2735
+
2736
+ Changes included in this release:
2737
+
2738
+ * Fix handling of tuple type context with unpacks (Ivan Levkivskyi, PR [16444](https://github.com/python/mypy/pull/16444))
2739
+ * Handle TypeVarTuples when checking overload constraints (robjhornby, PR [16428](https://github.com/python/mypy/pull/16428))
2740
+ * Enable Unpack/TypeVarTuple support (Ivan Levkivskyi, PR [16354](https://github.com/python/mypy/pull/16354))
2741
+ * Fix crash on unpack call special-casing (Ivan Levkivskyi, PR [16381](https://github.com/python/mypy/pull/16381))
2742
+ * Some final touches for variadic types support (Ivan Levkivskyi, PR [16334](https://github.com/python/mypy/pull/16334))
2743
+ * Support PEP-646 and PEP-692 in the same callable (Ivan Levkivskyi, PR [16294](https://github.com/python/mypy/pull/16294))
2744
+ * Support new `*` syntax for variadic types (Ivan Levkivskyi, PR [16242](https://github.com/python/mypy/pull/16242))
2745
+ * Correctly handle variadic instances with empty arguments (Ivan Levkivskyi, PR [16238](https://github.com/python/mypy/pull/16238))
2746
+ * Correctly handle runtime type applications of variadic types (Ivan Levkivskyi, PR [16240](https://github.com/python/mypy/pull/16240))
2747
+ * Support variadic tuple packing/unpacking (Ivan Levkivskyi, PR [16205](https://github.com/python/mypy/pull/16205))
2748
+ * Better support for variadic calls and indexing (Ivan Levkivskyi, PR [16131](https://github.com/python/mypy/pull/16131))
2749
+ * Subtyping and inference of user-defined variadic types (Ivan Levkivskyi, PR [16076](https://github.com/python/mypy/pull/16076))
2750
+ * Complete type analysis of variadic types (Ivan Levkivskyi, PR [15991](https://github.com/python/mypy/pull/15991))
2751
+
2752
+ ### New Way of Installing Mypyc Dependencies
2753
+
2754
+ If you want to install package dependencies needed by mypyc (not just mypy), you should now install `mypy[mypyc]` instead of just `mypy`:
2755
+
2756
+ ```
2757
+ python3 -m pip install -U 'mypy[mypyc]'
2758
+ ```
2759
+
2760
+ Mypy has many more users than mypyc, so always installing mypyc dependencies would often bring unnecessary dependencies.
2761
+
2762
+ This change was contributed by Shantanu (PR [16229](https://github.com/python/mypy/pull/16229)).
2763
+
2764
+ ### New Rules for Re-exports
2765
+
2766
+ Mypy no longer considers an import such as `import a.b as b` as an explicit re-export. The old behavior was arguably inconsistent and surprising. This may impact some stub packages, such as older versions of `types-six`. You can change the import to `from a import b as b`, if treating the import as a re-export was intentional.
2767
+
2768
+ This change was contributed by Anders Kaseorg (PR [14086](https://github.com/python/mypy/pull/14086)).
2769
+
2770
+ ### Improved Type Inference
2771
+
2772
+ The new type inference algorithm that was recently introduced to mypy (but was not enabled by default) is now enabled by default. It improves type inference of calls to generic callables where an argument is also a generic callable, in particular. You can use `--old-type-inference` to disable the new behavior.
2773
+
2774
+ The new algorithm can (rarely) produce different error messages, different error codes, or errors reported on different lines. This is more likely in cases where generic types were used incorrectly.
2775
+
2776
+ The new type inference algorithm was contributed by Ivan Levkivskyi. PR [16345](https://github.com/python/mypy/pull/16345) enabled it by default.
2777
+
2778
+ ### Narrowing Tuple Types Using len()
2779
+
2780
+ Mypy now can narrow tuple types using `len()` checks. Example:
2781
+
2782
+ ```python
2783
+ def f(t: tuple[int, int] | tuple[int, int, int]) -> None:
2784
+ if len(t) == 2:
2785
+ a, b = t # Ok
2786
+ ...
2787
+ ```
2788
+
2789
+ This feature was contributed by Ivan Levkivskyi (PR [16237](https://github.com/python/mypy/pull/16237)).
2790
+
2791
+ ### More Precise Tuple Lengths (Experimental)
2792
+
2793
+ Mypy supports experimental, more precise checking of tuple type lengths through `--enable-incomplete-feature=PreciseTupleTypes`. Refer to the [documentation](https://mypy.readthedocs.io/en/latest/command_line.html#enabling-incomplete-experimental-features) for more information.
2794
+
2795
+ More generally, we are planning to use `--enable-incomplete-feature` to introduce experimental features that would benefit from community feedback.
2796
+
2797
+ This feature was contributed by Ivan Levkivskyi (PR [16237](https://github.com/python/mypy/pull/16237)).
2798
+
2799
+ ### Mypy Changelog
2800
+
2801
+ We now maintain a [changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) in the mypy Git repository. It mirrors the contents of [mypy release blog posts](https://mypy-lang.blogspot.com/). We will continue to also publish release blog posts. In the future, release blog posts will be created based on the changelog near a release date.
2802
+
2803
+ This was contributed by Shantanu (PR [16280](https://github.com/python/mypy/pull/16280)).
2804
+
2805
+ ### Mypy Daemon Improvements
2806
+
2807
+ * Fix daemon crash caused by deleted submodule (Jukka Lehtosalo, PR [16370](https://github.com/python/mypy/pull/16370))
2808
+ * Fix file reloading in dmypy with --export-types (Ivan Levkivskyi, PR [16359](https://github.com/python/mypy/pull/16359))
2809
+ * Fix dmypy inspect on Windows (Ivan Levkivskyi, PR [16355](https://github.com/python/mypy/pull/16355))
2810
+ * Fix dmypy inspect for namespace packages (Ivan Levkivskyi, PR [16357](https://github.com/python/mypy/pull/16357))
2811
+ * Fix return type change to optional in generic function (Jukka Lehtosalo, PR [16342](https://github.com/python/mypy/pull/16342))
2812
+ * Fix daemon false positives related to module-level `__getattr__` (Jukka Lehtosalo, PR [16292](https://github.com/python/mypy/pull/16292))
2813
+ * Fix daemon crash related to ABCs (Jukka Lehtosalo, PR [16275](https://github.com/python/mypy/pull/16275))
2814
+ * Stream dmypy output instead of dumping everything at the end (Valentin Stanciu, PR [16252](https://github.com/python/mypy/pull/16252))
2815
+ * Make sure all dmypy errors are shown (Valentin Stanciu, PR [16250](https://github.com/python/mypy/pull/16250))
2816
+
2817
+ ### Mypyc Improvements
2818
+
2819
+ * Generate error on duplicate function definitions (Jukka Lehtosalo, PR [16309](https://github.com/python/mypy/pull/16309))
2820
+ * Don't crash on unreachable statements (Jukka Lehtosalo, PR [16311](https://github.com/python/mypy/pull/16311))
2821
+ * Avoid cyclic reference in nested functions (Jukka Lehtosalo, PR [16268](https://github.com/python/mypy/pull/16268))
2822
+ * Fix direct `__dict__` access on inner functions in new Python (Shantanu, PR [16084](https://github.com/python/mypy/pull/16084))
2823
+ * Make tuple packing and unpacking more efficient (Jukka Lehtosalo, PR [16022](https://github.com/python/mypy/pull/16022))
2824
+
2825
+ ### Improvements to Error Reporting
2826
+
2827
+ * Update starred expression error message to match CPython (Cibin Mathew, PR [16304](https://github.com/python/mypy/pull/16304))
2828
+ * Fix error code of "Maybe you forgot to use await" note (Jelle Zijlstra, PR [16203](https://github.com/python/mypy/pull/16203))
2829
+ * Use error code `[unsafe-overload]` for unsafe overloads, instead of `[misc]` (Randolf Scholz, PR [16061](https://github.com/python/mypy/pull/16061))
2830
+ * Reword the error message related to void functions (Albert Tugushev, PR [15876](https://github.com/python/mypy/pull/15876))
2831
+ * Represent bottom type as Never in messages (Shantanu, PR [15996](https://github.com/python/mypy/pull/15996))
2832
+ * Add hint for AsyncIterator incompatible return type (Ilya Priven, PR [15883](https://github.com/python/mypy/pull/15883))
2833
+ * Don't suggest stubs packages where the runtime package now ships with types (Alex Waygood, PR [16226](https://github.com/python/mypy/pull/16226))
2834
+
2835
+ ### Performance Improvements
2836
+
2837
+ * Speed up type argument checking (Jukka Lehtosalo, PR [16353](https://github.com/python/mypy/pull/16353))
2838
+ * Add fast path for checking self types (Jukka Lehtosalo, PR [16352](https://github.com/python/mypy/pull/16352))
2839
+ * Cache information about whether file is typeshed file (Jukka Lehtosalo, PR [16351](https://github.com/python/mypy/pull/16351))
2840
+ * Skip expensive `repr()` in logging call when not needed (Jukka Lehtosalo, PR [16350](https://github.com/python/mypy/pull/16350))
2841
+
2842
+ ### Attrs and Dataclass Improvements
2843
+
2844
+ * `dataclass.replace`: Allow transformed classes (Ilya Priven, PR [15915](https://github.com/python/mypy/pull/15915))
2845
+ * `dataclass.replace`: Fall through to typeshed signature (Ilya Priven, PR [15962](https://github.com/python/mypy/pull/15962))
2846
+ * Document `dataclass_transform` behavior (Ilya Priven, PR [16017](https://github.com/python/mypy/pull/16017))
2847
+ * `attrs`: Remove fields type check (Ilya Priven, PR [15983](https://github.com/python/mypy/pull/15983))
2848
+ * `attrs`, `dataclasses`: Don't enforce slots when base class doesn't (Ilya Priven, PR [15976](https://github.com/python/mypy/pull/15976))
2849
+ * Fix crash on dataclass field / property collision (Nikita Sobolev, PR [16147](https://github.com/python/mypy/pull/16147))
2850
+
2851
+ ### Stubgen Improvements
2852
+
2853
+ * Write stubs with utf-8 encoding (Jørgen Lind, PR [16329](https://github.com/python/mypy/pull/16329))
2854
+ * Fix missing property setter in semantic analysis mode (Ali Hamdan, PR [16303](https://github.com/python/mypy/pull/16303))
2855
+ * Unify C extension and pure python stub generators with object oriented design (Chad Dombrova, PR [15770](https://github.com/python/mypy/pull/15770))
2856
+ * Multiple fixes to the generated imports (Ali Hamdan, PR [15624](https://github.com/python/mypy/pull/15624))
2857
+ * Generate valid dataclass stubs (Ali Hamdan, PR [15625](https://github.com/python/mypy/pull/15625))
2858
+
2859
+ ### Fixes to Crashes
2860
+
2861
+ * Fix incremental mode crash on TypedDict in method (Ivan Levkivskyi, PR [16364](https://github.com/python/mypy/pull/16364))
2862
+ * Fix crash on star unpack in TypedDict (Ivan Levkivskyi, PR [16116](https://github.com/python/mypy/pull/16116))
2863
+ * Fix crash on malformed TypedDict in incremental mode (Ivan Levkivskyi, PR [16115](https://github.com/python/mypy/pull/16115))
2864
+ * Fix crash with report generation on namespace packages (Shantanu, PR [16019](https://github.com/python/mypy/pull/16019))
2865
+ * Fix crash when parsing error code config with typo (Shantanu, PR [16005](https://github.com/python/mypy/pull/16005))
2866
+ * Fix `__post_init__()` internal error (Ilya Priven, PR [16080](https://github.com/python/mypy/pull/16080))
2867
+
2868
+ ### Documentation Updates
2869
+
2870
+ * Make it easier to copy commands from README (Hamir Mahal, PR [16133](https://github.com/python/mypy/pull/16133))
2871
+ * Document and rename `[overload-overlap]` error code (Shantanu, PR [16074](https://github.com/python/mypy/pull/16074))
2872
+ * Document `--force-uppercase-builtins` and `--force-union-syntax` (Nikita Sobolev, PR [16049](https://github.com/python/mypy/pull/16049))
2873
+ * Document `force_union_syntax` and `force_uppercase_builtins` (Nikita Sobolev, PR [16048](https://github.com/python/mypy/pull/16048))
2874
+ * Document we're not tracking relationships between symbols (Ilya Priven, PR [16018](https://github.com/python/mypy/pull/16018))
2875
+
2876
+ ### Other Notable Changes and Fixes
2877
+
2878
+ * Propagate narrowed types to lambda expressions (Ivan Levkivskyi, PR [16407](https://github.com/python/mypy/pull/16407))
2879
+ * Avoid importing from `setuptools._distutils` (Shantanu, PR [16348](https://github.com/python/mypy/pull/16348))
2880
+ * Delete recursive aliases flags (Ivan Levkivskyi, PR [16346](https://github.com/python/mypy/pull/16346))
2881
+ * Properly use proper subtyping for callables (Ivan Levkivskyi, PR [16343](https://github.com/python/mypy/pull/16343))
2882
+ * Use upper bound as inference fallback more consistently (Ivan Levkivskyi, PR [16344](https://github.com/python/mypy/pull/16344))
2883
+ * Add `[unimported-reveal]` error code (Nikita Sobolev, PR [16271](https://github.com/python/mypy/pull/16271))
2884
+ * Add `|=` and `|` operators support for `TypedDict` (Nikita Sobolev, PR [16249](https://github.com/python/mypy/pull/16249))
2885
+ * Clarify variance convention for Parameters (Ivan Levkivskyi, PR [16302](https://github.com/python/mypy/pull/16302))
2886
+ * Correctly recognize `typing_extensions.NewType` (Ganden Schaffner, PR [16298](https://github.com/python/mypy/pull/16298))
2887
+ * Fix partially defined in the case of missing type maps (Shantanu, PR [15995](https://github.com/python/mypy/pull/15995))
2888
+ * Use SPDX license identifier (Nikita Sobolev, PR [16230](https://github.com/python/mypy/pull/16230))
2889
+ * Make `__qualname__` and `__module__` available in class bodies (Anthony Sottile, PR [16215](https://github.com/python/mypy/pull/16215))
2890
+ * stubtest: Hint when args in stub need to be keyword-only (Alex Waygood, PR [16210](https://github.com/python/mypy/pull/16210))
2891
+ * Tuple slice should not propagate fallback (Thomas Grainger, PR [16154](https://github.com/python/mypy/pull/16154))
2892
+ * Fix cases of type object handling for overloads (Shantanu, PR [16168](https://github.com/python/mypy/pull/16168))
2893
+ * Fix walrus interaction with empty collections (Ivan Levkivskyi, PR [16197](https://github.com/python/mypy/pull/16197))
2894
+ * Use type variable bound when it appears as actual during inference (Ivan Levkivskyi, PR [16178](https://github.com/python/mypy/pull/16178))
2895
+ * Use upper bounds as fallback solutions for inference (Ivan Levkivskyi, PR [16184](https://github.com/python/mypy/pull/16184))
2896
+ * Special-case type inference of empty collections (Ivan Levkivskyi, PR [16122](https://github.com/python/mypy/pull/16122))
2897
+ * Allow TypedDict unpacking in Callable types (Ivan Levkivskyi, PR [16083](https://github.com/python/mypy/pull/16083))
2898
+ * Fix inference for overloaded `__call__` with generic self (Shantanu, PR [16053](https://github.com/python/mypy/pull/16053))
2899
+ * Call dynamic class hook on generic classes (Petter Friberg, PR [16052](https://github.com/python/mypy/pull/16052))
2900
+ * Preserve implicitly exported types via attribute access (Shantanu, PR [16129](https://github.com/python/mypy/pull/16129))
2901
+ * Fix a stubtest bug (Alex Waygood)
2902
+ * Fix `tuple[Any, ...]` subtyping (Shantanu, PR [16108](https://github.com/python/mypy/pull/16108))
2903
+ * Lenient handling of trivial Callable suffixes (Ivan Levkivskyi, PR [15913](https://github.com/python/mypy/pull/15913))
2904
+ * Add `add_overloaded_method_to_class` helper for plugins (Nikita Sobolev, PR [16038](https://github.com/python/mypy/pull/16038))
2905
+ * Bundle `misc/proper_plugin.py` as a part of `mypy` (Nikita Sobolev, PR [16036](https://github.com/python/mypy/pull/16036))
2906
+ * Fix `case Any()` in match statement (DS/Charlie, PR [14479](https://github.com/python/mypy/pull/14479))
2907
+ * Make iterable logic more consistent (Shantanu, PR [16006](https://github.com/python/mypy/pull/16006))
2908
+ * Fix inference for properties with `__call__` (Shantanu, PR [15926](https://github.com/python/mypy/pull/15926))
2909
+
2910
+ ### Typeshed Updates
2911
+
2912
+ Please see [git log](https://github.com/python/typeshed/commits/main?after=4a854366e03dee700109f8e758a08b2457ea2f51+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.
2913
+
2914
+ ### Acknowledgements
2915
+
2916
+ Thanks to all mypy contributors who contributed to this release:
2917
+
2918
+ * Albert Tugushev
2919
+ * Alex Waygood
2920
+ * Ali Hamdan
2921
+ * Anders Kaseorg
2922
+ * Anthony Sottile
2923
+ * Chad Dombrova
2924
+ * Cibin Mathew
2925
+ * dinaldoap
2926
+ * DS/Charlie
2927
+ * Eli Schwartz
2928
+ * Ganden Schaffner
2929
+ * Hamir Mahal
2930
+ * Ihor
2931
+ * Ikko Eltociear Ashimine
2932
+ * Ilya Priven
2933
+ * Ivan Levkivskyi
2934
+ * Jelle Zijlstra
2935
+ * Jukka Lehtosalo
2936
+ * Jørgen Lind
2937
+ * KotlinIsland
2938
+ * Matt Bogosian
2939
+ * Nikita Sobolev
2940
+ * Petter Friberg
2941
+ * Randolf Scholz
2942
+ * Shantanu
2943
+ * Thomas Grainger
2944
+ * Valentin Stanciu
2945
+
2946
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
2947
+
2948
+ Posted by Jukka Lehtosalo
2949
+
2950
+ ## Mypy 1.6
2951
+
2952
+ [Tuesday, 10 October 2023](https://mypy-lang.blogspot.com/2023/10/mypy-16-released.html)
2953
+
2954
+ We’ve just uploaded mypy 1.6 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
2955
+
2956
+ python3 -m pip install -U mypy
2957
+
2958
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
2959
+
2960
+ ### Introduce Error Subcodes for Import Errors
2961
+
2962
+ Mypy now uses the error code import-untyped if an import targets an installed library that doesn’t support static type checking, and no stub files are available. Other invalid imports produce the import-not-found error code. They both are subcodes of the import error code, which was previously used for both kinds of import-related errors.
2963
+
2964
+ Use \--disable-error-code=import-untyped to only ignore import errors about installed libraries without stubs. This way mypy will still report errors about typos in import statements, for example.
2965
+
2966
+ If you use \--warn-unused-ignore or \--strict, mypy will complain if you use \# type: ignore\[import\] to ignore an import error. You are expected to use one of the more specific error codes instead. Otherwise, ignoring the import error code continues to silence both errors.
2967
+
2968
+ This feature was contributed by Shantanu (PR [15840](https://github.com/python/mypy/pull/15840), PR [14740](https://github.com/python/mypy/pull/14740)).
2969
+
2970
+ ### Remove Support for Targeting Python 3.6 and Earlier
2971
+
2972
+ Running mypy with \--python-version 3.6, for example, is no longer supported. Python 3.6 hasn’t been properly supported by mypy for some time now, and this makes it explicit. This was contributed by Nikita Sobolev (PR [15668](https://github.com/python/mypy/pull/15668)).
2973
+
2974
+ ### Selective Filtering of \--disallow-untyped-calls Targets
2975
+
2976
+ Using \--disallow-untyped-calls could be annoying when using libraries with missing type information, as mypy would generate many errors about code that uses the library. Now you can use \--untyped-calls-exclude=acme, for example, to disable these errors about calls targeting functions defined in the acme package. Refer to the [documentation](https://mypy.readthedocs.io/en/latest/command_line.html#cmdoption-mypy-untyped-calls-exclude) for more information.
2977
+
2978
+ This feature was contributed by Ivan Levkivskyi (PR [15845](https://github.com/python/mypy/pull/15845)).
2979
+
2980
+ ### Improved Type Inference between Callable Types
2981
+
2982
+ Mypy now does a better job inferring type variables inside arguments of callable types. For example, this code fragment now type checks correctly:
2983
+
2984
+ ```python
2985
+ def f(c: Callable[[T, S], None]) -> Callable[[str, T, S], None]: ...
2986
+ def g(*x: int) -> None: ...
2987
+
2988
+ reveal_type(f(g)) # Callable[[str, int, int], None]
2989
+ ```
2990
+
2991
+ This was contributed by Ivan Levkivskyi (PR [15910](https://github.com/python/mypy/pull/15910)).
2992
+
2993
+ ### Don’t Consider None and TypeVar to Overlap in Overloads
2994
+
2995
+ Mypy now doesn’t consider an overload item with an argument type None to overlap with a type variable:
2996
+
2997
+ ```python
2998
+ @overload
2999
+ def f(x: None) -> None: ..
3000
+ @overload
3001
+ def f(x: T) -> Foo[T]: ...
3002
+ ...
3003
+ ```
3004
+
3005
+ Previously mypy would generate an error about the definition of f above. This is slightly unsafe if the upper bound of T is object, since the value of the type variable could be None. We relaxed the rules a little, since this solves a common issue.
3006
+
3007
+ This feature was contributed by Ivan Levkivskyi (PR [15846](https://github.com/python/mypy/pull/15846)).
3008
+
3009
+ ### Improvements to \--new-type-inference
3010
+
3011
+ The experimental new type inference algorithm (polymorphic inference) introduced as an opt-in feature in mypy 1.5 has several improvements:
3012
+
3013
+ * Improve transitive closure computation during constraint solving (Ivan Levkivskyi, PR [15754](https://github.com/python/mypy/pull/15754))
3014
+ * Add support for upper bounds and values with \--new-type-inference (Ivan Levkivskyi, PR [15813](https://github.com/python/mypy/pull/15813))
3015
+ * Basic support for variadic types with \--new-type-inference (Ivan Levkivskyi, PR [15879](https://github.com/python/mypy/pull/15879))
3016
+ * Polymorphic inference: support for parameter specifications and lambdas (Ivan Levkivskyi, PR [15837](https://github.com/python/mypy/pull/15837))
3017
+ * Invalidate cache when adding \--new-type-inference (Marc Mueller, PR [16059](https://github.com/python/mypy/pull/16059))
3018
+
3019
+ **Note:** We are planning to enable \--new-type-inference by default in mypy 1.7. Please try this out and let us know if you encounter any issues.
3020
+
3021
+ ### ParamSpec Improvements
3022
+
3023
+ * Support self-types containing ParamSpec (Ivan Levkivskyi, PR [15903](https://github.com/python/mypy/pull/15903))
3024
+ * Allow “…” in Concatenate, and clean up ParamSpec literals (Ivan Levkivskyi, PR [15905](https://github.com/python/mypy/pull/15905))
3025
+ * Fix ParamSpec inference for callback protocols (Ivan Levkivskyi, PR [15986](https://github.com/python/mypy/pull/15986))
3026
+ * Infer ParamSpec constraint from arguments (Ivan Levkivskyi, PR [15896](https://github.com/python/mypy/pull/15896))
3027
+ * Fix crash on invalid type variable with ParamSpec (Ivan Levkivskyi, PR [15953](https://github.com/python/mypy/pull/15953))
3028
+ * Fix subtyping between ParamSpecs (Ivan Levkivskyi, PR [15892](https://github.com/python/mypy/pull/15892))
3029
+
3030
+ ### Stubgen Improvements
3031
+
3032
+ * Add option to include docstrings with stubgen (chylek, PR [13284](https://github.com/python/mypy/pull/13284))
3033
+ * Add required ... initializer to NamedTuple fields with default values (Nikita Sobolev, PR [15680](https://github.com/python/mypy/pull/15680))
3034
+
3035
+ ### Stubtest Improvements
3036
+
3037
+ * Fix \_\_mypy-replace false positives (Alex Waygood, PR [15689](https://github.com/python/mypy/pull/15689))
3038
+ * Fix edge case for bytes enum subclasses (Alex Waygood, PR [15943](https://github.com/python/mypy/pull/15943))
3039
+ * Generate error if typeshed is missing modules from the stdlib (Alex Waygood, PR [15729](https://github.com/python/mypy/pull/15729))
3040
+ * Fixes to new check for missing stdlib modules (Alex Waygood, PR [15960](https://github.com/python/mypy/pull/15960))
3041
+ * Fix stubtest enum.Flag edge case (Alex Waygood, PR [15933](https://github.com/python/mypy/pull/15933))
3042
+
3043
+ ### Documentation Improvements
3044
+
3045
+ * Do not advertise to create your own assert\_never helper (Nikita Sobolev, PR [15947](https://github.com/python/mypy/pull/15947))
3046
+ * Fix all the missing references found within the docs (Albert Tugushev, PR [15875](https://github.com/python/mypy/pull/15875))
3047
+ * Document await-not-async error code (Shantanu, PR [15858](https://github.com/python/mypy/pull/15858))
3048
+ * Improve documentation of disabling error codes (Shantanu, PR [15841](https://github.com/python/mypy/pull/15841))
3049
+
3050
+ ### Other Notable Changes and Fixes
3051
+
3052
+ * Make unsupported PEP 695 features (introduced in Python 3.12) give a reasonable error message (Shantanu, PR [16013](https://github.com/python/mypy/pull/16013))
3053
+ * Remove the \--py2 command-line argument (Marc Mueller, PR [15670](https://github.com/python/mypy/pull/15670))
3054
+ * Change empty tuple from tuple\[\] to tuple\[()\] in error messages (Nikita Sobolev, PR [15783](https://github.com/python/mypy/pull/15783))
3055
+ * Fix assert\_type failures when some nodes are deferred (Nikita Sobolev, PR [15920](https://github.com/python/mypy/pull/15920))
3056
+ * Generate error on unbound TypeVar with values (Nikita Sobolev, PR [15732](https://github.com/python/mypy/pull/15732))
3057
+ * Fix over-eager types-google-cloud-ndb suggestion (Shantanu, PR [15347](https://github.com/python/mypy/pull/15347))
3058
+ * Fix type narrowing of \== None and in (None,) conditions (Marti Raudsepp, PR [15760](https://github.com/python/mypy/pull/15760))
3059
+ * Fix inference for attrs.fields (Shantanu, PR [15688](https://github.com/python/mypy/pull/15688))
3060
+ * Make “await in non-async function” a non-blocking error and give it an error code (Gregory Santosa, PR [15384](https://github.com/python/mypy/pull/15384))
3061
+ * Add basic support for decorated overloads (Ivan Levkivskyi, PR [15898](https://github.com/python/mypy/pull/15898))
3062
+ * Fix TypeVar regression with self types (Ivan Levkivskyi, PR [15945](https://github.com/python/mypy/pull/15945))
3063
+ * Add \_\_match\_args\_\_ to dataclasses with no fields (Ali Hamdan, PR [15749](https://github.com/python/mypy/pull/15749))
3064
+ * Include stdout and stderr in dmypy verbose output (Valentin Stanciu, PR [15881](https://github.com/python/mypy/pull/15881))
3065
+ * Improve match narrowing and reachability analysis (Shantanu, PR [15882](https://github.com/python/mypy/pull/15882))
3066
+ * Support \_\_bool\_\_ with Literal in \--warn-unreachable (Jannic Warken, PR [15645](https://github.com/python/mypy/pull/15645))
3067
+ * Fix inheriting from generic @frozen attrs class (Ilya Priven, PR [15700](https://github.com/python/mypy/pull/15700))
3068
+ * Correctly narrow types for tuple\[type\[X\], ...\] (Nikita Sobolev, PR [15691](https://github.com/python/mypy/pull/15691))
3069
+ * Don't flag intentionally empty generators unreachable (Ilya Priven, PR [15722](https://github.com/python/mypy/pull/15722))
3070
+ * Add tox.ini to mypy sdist (Marcel Telka, PR [15853](https://github.com/python/mypy/pull/15853))
3071
+ * Fix mypyc regression with pretty (Shantanu, PR [16124](https://github.com/python/mypy/pull/16124))
3072
+
3073
+ ### Typeshed Updates
3074
+
3075
+ Typeshed is now modular and distributed as separate PyPI packages for everything except the standard library stubs. Please see [git log](https://github.com/python/typeshed/commits/main?after=6a8d653a671925b0a3af61729ff8cf3f90c9c662+0&branch=main&path=stdlib) for full list of typeshed changes.
3076
+
3077
+ ### Acknowledgements
3078
+
3079
+ Thanks to Max Murin, who did most of the release manager work for this release (I just did the final steps).
3080
+
3081
+ Thanks to all mypy contributors who contributed to this release:
3082
+
3083
+ * Albert Tugushev
3084
+ * Alex Waygood
3085
+ * Ali Hamdan
3086
+ * chylek
3087
+ * EXPLOSION
3088
+ * Gregory Santosa
3089
+ * Ilya Priven
3090
+ * Ivan Levkivskyi
3091
+ * Jannic Warken
3092
+ * KotlinIsland
3093
+ * Marc Mueller
3094
+ * Marcel Johannesmann
3095
+ * Marcel Telka
3096
+ * Mark Byrne
3097
+ * Marti Raudsepp
3098
+ * Max Murin
3099
+ * Nikita Sobolev
3100
+ * Shantanu
3101
+ * Valentin Stanciu
3102
+
3103
+ Posted by Jukka Lehtosalo
3104
+
3105
+
3106
+ ## Mypy 1.5
3107
+
3108
+ [Thursday, 10 August 2023](https://mypy-lang.blogspot.com/2023/08/mypy-15-released.html)
3109
+
3110
+ We’ve just uploaded mypy 1.5 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, deprecations and bug fixes. You can install it as follows:
3111
+
3112
+ python3 -m pip install -U mypy
3113
+
3114
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
3115
+
3116
+ ### Drop Support for Python 3.7
3117
+
3118
+ Mypy no longer supports running with Python 3.7, which has reached end-of-life. This was contributed by Shantanu (PR [15566](https://github.com/python/mypy/pull/15566)).
3119
+
3120
+ ### Optional Check to Require Explicit @override
3121
+
3122
+ If you enable the explicit-override error code, mypy will generate an error if a method override doesn’t use the @typing.override decorator (as discussed in [PEP 698](https://peps.python.org/pep-0698/#strict-enforcement-per-project)). This way mypy will detect accidentally introduced overrides. Example:
3123
+
3124
+ ```python
3125
+ # mypy: enable-error-code="explicit-override"
3126
+
3127
+ from typing_extensions import override
3128
+
3129
+ class C:
3130
+ def foo(self) -> None: pass
3131
+ def bar(self) -> None: pass
3132
+
3133
+ class D(C):
3134
+ # Error: Method "foo" is not using @override but is
3135
+ # overriding a method
3136
+ def foo(self) -> None:
3137
+ ...
3138
+
3139
+ @override
3140
+ def bar(self) -> None: # OK
3141
+ ...
3142
+ ```
3143
+
3144
+ You can enable the error code via \--enable-error-code=explicit-override on the mypy command line or enable\_error\_code = explicit-override in the mypy config file.
3145
+
3146
+ The override decorator will be available in typing in Python 3.12, but you can also use the backport from a recent version of `typing_extensions` on all supported Python versions.
3147
+
3148
+ This feature was contributed by Marc Mueller(PR [15512](https://github.com/python/mypy/pull/15512)).
3149
+
3150
+ ### More Flexible TypedDict Creation and Update
3151
+
3152
+ Mypy was previously overly strict when type checking TypedDict creation and update operations. Though these checks were often technically correct, they sometimes triggered for apparently valid code. These checks have now been relaxed by default. You can enable stricter checking by using the new \--extra-checks flag.
3153
+
3154
+ Construction using the `**` syntax is now more flexible:
3155
+
3156
+ ```python
3157
+ from typing import TypedDict
3158
+
3159
+ class A(TypedDict):
3160
+ foo: int
3161
+ bar: int
3162
+
3163
+ class B(TypedDict):
3164
+ foo: int
3165
+
3166
+ a: A = {"foo": 1, "bar": 2}
3167
+ b: B = {"foo": 3}
3168
+ a2: A = { **a, **b} # OK (previously an error)
3169
+ ```
3170
+
3171
+ You can also call update() with a TypedDict argument that contains a subset of the keys in the updated TypedDict:
3172
+ ```python
3173
+ a.update(b) # OK (previously an error)
3174
+ ```
3175
+
3176
+ This feature was contributed by Ivan Levkivskyi (PR [15425](https://github.com/python/mypy/pull/15425)).
3177
+
3178
+ ### Deprecated Flag: \--strict-concatenate
3179
+
3180
+ The behavior of \--strict-concatenate is now included in the new \--extra-checks flag, and the old flag is deprecated.
3181
+
3182
+ ### Optionally Show Links to Error Code Documentation
3183
+
3184
+ If you use \--show-error-code-links, mypy will add documentation links to (many) reported errors. The links are not shown for error messages that are sufficiently obvious, and they are shown once per error code only.
3185
+
3186
+ Example output:
3187
+ ```
3188
+ a.py:1: error: Need type annotation for "foo" (hint: "x: List[<type>] = ...") [var-annotated]
3189
+ a.py:1: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-var-annotated for more info
3190
+ ```
3191
+ This was contributed by Ivan Levkivskyi (PR [15449](https://github.com/python/mypy/pull/15449)).
3192
+
3193
+ ### Consistently Avoid Type Checking Unreachable Code
3194
+
3195
+ If a module top level has unreachable code, mypy won’t type check the unreachable statements. This is consistent with how functions behave. The behavior of \--warn-unreachable is also more consistent now.
3196
+
3197
+ This was contributed by Ilya Priven (PR [15386](https://github.com/python/mypy/pull/15386)).
3198
+
3199
+ ### Experimental Improved Type Inference for Generic Functions
3200
+
3201
+ You can use \--new-type-inference to opt into an experimental new type inference algorithm. It fixes issues when calling a generic functions with an argument that is also a generic function, in particular. This current implementation is still incomplete, but we encourage trying it out and reporting bugs if you encounter regressions. We are planning to enable the new algorithm by default in a future mypy release.
3202
+
3203
+ This feature was contributed by Ivan Levkivskyi (PR [15287](https://github.com/python/mypy/pull/15287)).
3204
+
3205
+ ### Partial Support for Python 3.12
3206
+
3207
+ Mypy and mypyc now support running on recent Python 3.12 development versions. Not all new Python 3.12 features are supported, and we don’t ship compiled wheels for Python 3.12 yet.
3208
+
3209
+ * Fix ast warnings for Python 3.12 (Nikita Sobolev, PR [15558](https://github.com/python/mypy/pull/15558))
3210
+ * mypyc: Fix multiple inheritance with a protocol on Python 3.12 (Jukka Lehtosalo, PR [15572](https://github.com/python/mypy/pull/15572))
3211
+ * mypyc: Fix self-compilation on Python 3.12 (Jukka Lehtosalo, PR [15582](https://github.com/python/mypy/pull/15582))
3212
+ * mypyc: Fix 3.12 issue with pickling of instances with \_\_dict\_\_ (Jukka Lehtosalo, PR [15574](https://github.com/python/mypy/pull/15574))
3213
+ * mypyc: Fix i16 on Python 3.12 (Jukka Lehtosalo, PR [15510](https://github.com/python/mypy/pull/15510))
3214
+ * mypyc: Fix int operations on Python 3.12 (Jukka Lehtosalo, PR [15470](https://github.com/python/mypy/pull/15470))
3215
+ * mypyc: Fix generators on Python 3.12 (Jukka Lehtosalo, PR [15472](https://github.com/python/mypy/pull/15472))
3216
+ * mypyc: Fix classes with \_\_dict\_\_ on 3.12 (Jukka Lehtosalo, PR [15471](https://github.com/python/mypy/pull/15471))
3217
+ * mypyc: Fix coroutines on Python 3.12 (Jukka Lehtosalo, PR [15469](https://github.com/python/mypy/pull/15469))
3218
+ * mypyc: Don't use \_PyErr\_ChainExceptions on 3.12, since it's deprecated (Jukka Lehtosalo, PR [15468](https://github.com/python/mypy/pull/15468))
3219
+ * mypyc: Add Python 3.12 feature macro (Jukka Lehtosalo, PR [15465](https://github.com/python/mypy/pull/15465))
3220
+
3221
+ ### Improvements to Dataclasses
3222
+
3223
+ * Improve signature of dataclasses.replace (Ilya Priven, PR [14849](https://github.com/python/mypy/pull/14849))
3224
+ * Fix dataclass/protocol crash on joining types (Ilya Priven, PR [15629](https://github.com/python/mypy/pull/15629))
3225
+ * Fix strict optional handling in dataclasses (Ivan Levkivskyi, PR [15571](https://github.com/python/mypy/pull/15571))
3226
+ * Support optional types for custom dataclass descriptors (Marc Mueller, PR [15628](https://github.com/python/mypy/pull/15628))
3227
+ * Add `__slots__` attribute to dataclasses (Nikita Sobolev, PR [15649](https://github.com/python/mypy/pull/15649))
3228
+ * Support better \_\_post\_init\_\_ method signature for dataclasses (Nikita Sobolev, PR [15503](https://github.com/python/mypy/pull/15503))
3229
+
3230
+ ### Mypyc Improvements
3231
+
3232
+ * Support unsigned 8-bit native integer type: mypy\_extensions.u8 (Jukka Lehtosalo, PR [15564](https://github.com/python/mypy/pull/15564))
3233
+ * Support signed 16-bit native integer type: mypy\_extensions.i16 (Jukka Lehtosalo, PR [15464](https://github.com/python/mypy/pull/15464))
3234
+ * Define mypy\_extensions.i16 in stubs (Jukka Lehtosalo, PR [15562](https://github.com/python/mypy/pull/15562))
3235
+ * Document more unsupported features and update supported features (Richard Si, PR [15524](https://github.com/python/mypy/pull/15524))
3236
+ * Fix final NamedTuple classes (Richard Si, PR [15513](https://github.com/python/mypy/pull/15513))
3237
+ * Use C99 compound literals for undefined tuple values (Jukka Lehtosalo, PR [15453](https://github.com/python/mypy/pull/15453))
3238
+ * Don't explicitly assign NULL values in setup functions (Logan Hunt, PR [15379](https://github.com/python/mypy/pull/15379))
3239
+
3240
+ ### Stubgen Improvements
3241
+
3242
+ * Teach stubgen to work with complex and unary expressions (Nikita Sobolev, PR [15661](https://github.com/python/mypy/pull/15661))
3243
+ * Support ParamSpec and TypeVarTuple (Ali Hamdan, PR [15626](https://github.com/python/mypy/pull/15626))
3244
+ * Fix crash on non-str docstring (Ali Hamdan, PR [15623](https://github.com/python/mypy/pull/15623))
3245
+
3246
+ ### Documentation Updates
3247
+
3248
+ * Add documentation for additional error codes (Ivan Levkivskyi, PR [15539](https://github.com/python/mypy/pull/15539))
3249
+ * Improve documentation of type narrowing (Ilya Priven, PR [15652](https://github.com/python/mypy/pull/15652))
3250
+ * Small improvements to protocol documentation (Shantanu, PR [15460](https://github.com/python/mypy/pull/15460))
3251
+ * Remove confusing instance variable example in cheat sheet (Adel Atallah, PR [15441](https://github.com/python/mypy/pull/15441))
3252
+
3253
+ ### Other Notable Fixes and Improvements
3254
+
3255
+ * Constant fold additional unary and binary expressions (Richard Si, PR [15202](https://github.com/python/mypy/pull/15202))
3256
+ * Exclude the same special attributes from Protocol as CPython (Kyle Benesch, PR [15490](https://github.com/python/mypy/pull/15490))
3257
+ * Change the default value of the slots argument of attrs.define to True, to match runtime behavior (Ilya Priven, PR [15642](https://github.com/python/mypy/pull/15642))
3258
+ * Fix type of class attribute if attribute is defined in both class and metaclass (Alex Waygood, PR [14988](https://github.com/python/mypy/pull/14988))
3259
+ * Handle type the same as typing.Type in the first argument of classmethods (Erik Kemperman, PR [15297](https://github.com/python/mypy/pull/15297))
3260
+ * Fix \--find-occurrences flag (Shantanu, PR [15528](https://github.com/python/mypy/pull/15528))
3261
+ * Fix error location for class patterns (Nikita Sobolev, PR [15506](https://github.com/python/mypy/pull/15506))
3262
+ * Fix re-added file with errors in mypy daemon (Ivan Levkivskyi, PR [15440](https://github.com/python/mypy/pull/15440))
3263
+ * Fix dmypy run on Windows (Ivan Levkivskyi, PR [15429](https://github.com/python/mypy/pull/15429))
3264
+ * Fix abstract and non-abstract variant error for property deleter (Shantanu, PR [15395](https://github.com/python/mypy/pull/15395))
3265
+ * Remove special casing for "cannot" in error messages (Ilya Priven, PR [15428](https://github.com/python/mypy/pull/15428))
3266
+ * Add runtime `__slots__` attribute to attrs classes (Nikita Sobolev, PR [15651](https://github.com/python/mypy/pull/15651))
3267
+ * Add get\_expression\_type to CheckerPluginInterface (Ilya Priven, PR [15369](https://github.com/python/mypy/pull/15369))
3268
+ * Remove parameters that no longer exist from NamedTuple.\_make() (Alex Waygood, PR [15578](https://github.com/python/mypy/pull/15578))
3269
+ * Allow using typing.Self in `__all__` with an explicit @staticmethod decorator (Erik Kemperman, PR [15353](https://github.com/python/mypy/pull/15353))
3270
+ * Fix self types in subclass methods without Self annotation (Ivan Levkivskyi, PR [15541](https://github.com/python/mypy/pull/15541))
3271
+ * Check for abstract class objects in tuples (Nikita Sobolev, PR [15366](https://github.com/python/mypy/pull/15366))
3272
+
3273
+ ### Typeshed Updates
3274
+
3275
+ Typeshed is now modular and distributed as separate PyPI packages for everything except the standard library stubs. Please see [git log](https://github.com/python/typeshed/commits/main?after=fc7d4722eaa54803926cee5730e1f784979c0531+0&branch=main&path=stdlib) for full list of typeshed changes.
3276
+
3277
+ ### Acknowledgements
3278
+
3279
+ Thanks to all mypy contributors who contributed to this release:
3280
+
3281
+ * Adel Atallah
3282
+ * Alex Waygood
3283
+ * Ali Hamdan
3284
+ * Erik Kemperman
3285
+ * Federico Padua
3286
+ * Ilya Priven
3287
+ * Ivan Levkivskyi
3288
+ * Jelle Zijlstra
3289
+ * Jared Hance
3290
+ * Jukka Lehtosalo
3291
+ * Kyle Benesch
3292
+ * Logan Hunt
3293
+ * Marc Mueller
3294
+ * Nikita Sobolev
3295
+ * Richard Si
3296
+ * Shantanu
3297
+ * Stavros Ntentos
3298
+ * Valentin Stanciu
3299
+
3300
+ Posted by Valentin Stanciu
3301
+
3302
+
3303
+ ## Mypy 1.4
3304
+
3305
+ [Tuesday, 20 June 2023](https://mypy-lang.blogspot.com/2023/06/mypy-140-released.html)
3306
+
3307
+ We’ve just uploaded mypy 1.4 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
3308
+
3309
+ python3 -m pip install -U mypy
3310
+
3311
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
3312
+
3313
+ ### The Override Decorator
3314
+
3315
+ Mypy can now ensure that when renaming a method, overrides are also renamed. You can explicitly mark a method as overriding a base class method by using the @typing.override decorator ([PEP 698](https://peps.python.org/pep-0698/)). If the method is then renamed in the base class while the method override is not, mypy will generate an error. The decorator will be available in typing in Python 3.12, but you can also use the backport from a recent version of `typing_extensions` on all supported Python versions.
3316
+
3317
+ This feature was contributed byThomas M Kehrenberg (PR [14609](https://github.com/python/mypy/pull/14609)).
3318
+
3319
+ ### Propagating Type Narrowing to Nested Functions
3320
+
3321
+ Previously, type narrowing was not propagated to nested functions because it would not be sound if the narrowed variable changed between the definition of the nested function and the call site. Mypy will now propagate the narrowed type if the variable is not assigned to after the definition of the nested function:
3322
+
3323
+ ```python
3324
+ def outer(x: str | None = None) -> None:
3325
+ if x is None:
3326
+ x = calculate_default()
3327
+ reveal_type(x) # "str" (narrowed)
3328
+
3329
+ def nested() -> None:
3330
+ reveal_type(x) # Now "str" (used to be "str | None")
3331
+
3332
+ nested()
3333
+ ```
3334
+
3335
+ This may generate some new errors because asserts that were previously necessary may become tautological or no-ops.
3336
+
3337
+ This was contributed by Jukka Lehtosalo (PR [15133](https://github.com/python/mypy/pull/15133)).
3338
+
3339
+ ### Narrowing Enum Values Using “==”
3340
+
3341
+ Mypy now allows narrowing enum types using the \== operator. Previously this was only supported when using the is operator. This makes exhaustiveness checking with enum types more usable, as the requirement to use the is operator was not very intuitive. In this example mypy can detect that the developer forgot to handle the value MyEnum.C in example
3342
+
3343
+ ```python
3344
+ from enum import Enum
3345
+
3346
+ class MyEnum(Enum):
3347
+ A = 0
3348
+ B = 1
3349
+ C = 2
3350
+
3351
+ def example(e: MyEnum) -> str: # Error: Missing return statement
3352
+ if e == MyEnum.A:
3353
+ return 'x'
3354
+ elif e == MyEnum.B:
3355
+ return 'y'
3356
+ ```
3357
+
3358
+ Adding an extra elif case resolves the error:
3359
+
3360
+ ```python
3361
+ ...
3362
+ def example(e: MyEnum) -> str: # No error -- all values covered
3363
+ if e == MyEnum.A:
3364
+ return 'x'
3365
+ elif e == MyEnum.B:
3366
+ return 'y'
3367
+ elif e == MyEnum.C:
3368
+ return 'z'
3369
+ ```
3370
+
3371
+ This change can cause false positives in test cases that have assert statements like assert o.x == SomeEnum.X when using \--strict-equality. Example:
3372
+
3373
+ ```python
3374
+ # mypy: strict-equality
3375
+
3376
+ from enum import Enum
3377
+
3378
+ class MyEnum(Enum):
3379
+ A = 0
3380
+ B = 1
3381
+
3382
+ class C:
3383
+ x: MyEnum
3384
+ ...
3385
+
3386
+ def test_something() -> None:
3387
+ c = C(...)
3388
+ assert c.x == MyEnum.A
3389
+ c.do_something_that_changes_x()
3390
+ assert c.x == MyEnum.B # Error: Non-overlapping equality check
3391
+ ```
3392
+
3393
+ These errors can be ignored using \# type: ignore\[comparison-overlap\], or you can perform the assertion using a temporary variable as a workaround:
3394
+
3395
+ ```python
3396
+ ...
3397
+ def test_something() -> None:
3398
+ ...
3399
+ x = c.x
3400
+ assert x == MyEnum.A # Does not narrow c.x
3401
+ c.do_something_that_changes_x()
3402
+ x = c.x
3403
+ assert x == MyEnum.B # OK
3404
+ ```
3405
+
3406
+ This feature was contributed by Shantanu (PR [11521](https://github.com/python/mypy/pull/11521)).
3407
+
3408
+ ### Performance Improvements
3409
+
3410
+ * Speed up simplification of large union types and also fix a recursive tuple crash (Shantanu, PR [15128](https://github.com/python/mypy/pull/15128))
3411
+ * Speed up union subtyping (Shantanu, PR [15104](https://github.com/python/mypy/pull/15104))
3412
+ * Don't type check most function bodies when type checking third-party library code, or generally when ignoring errors (Jukka Lehtosalo, PR [14150](https://github.com/python/mypy/pull/14150))
3413
+
3414
+ ### Improvements to Plugins
3415
+
3416
+ * attrs.evolve: Support generics and unions (Ilya Konstantinov, PR [15050](https://github.com/python/mypy/pull/15050))
3417
+ * Fix ctypes plugin (Alex Waygood)
3418
+
3419
+ ### Fixes to Crashes
3420
+
3421
+ * Fix a crash when function-scope recursive alias appears as upper bound (Ivan Levkivskyi, PR [15159](https://github.com/python/mypy/pull/15159))
3422
+ * Fix crash on follow\_imports\_for\_stubs (Ivan Levkivskyi, PR [15407](https://github.com/python/mypy/pull/15407))
3423
+ * Fix stubtest crash in explicit init subclass (Shantanu, PR [15399](https://github.com/python/mypy/pull/15399))
3424
+ * Fix crash when indexing TypedDict with empty key (Shantanu, PR [15392](https://github.com/python/mypy/pull/15392))
3425
+ * Fix crash on NamedTuple as attribute (Ivan Levkivskyi, PR [15404](https://github.com/python/mypy/pull/15404))
3426
+ * Correctly track loop depth for nested functions/classes (Ivan Levkivskyi, PR [15403](https://github.com/python/mypy/pull/15403))
3427
+ * Fix crash on joins with recursive tuples (Ivan Levkivskyi, PR [15402](https://github.com/python/mypy/pull/15402))
3428
+ * Fix crash with custom ErrorCode subclasses (Marc Mueller, PR [15327](https://github.com/python/mypy/pull/15327))
3429
+ * Fix crash in dataclass protocol with self attribute assignment (Ivan Levkivskyi, PR [15157](https://github.com/python/mypy/pull/15157))
3430
+ * Fix crash on lambda in generic context with generic method in body (Ivan Levkivskyi, PR [15155](https://github.com/python/mypy/pull/15155))
3431
+ * Fix recursive type alias crash in make\_simplified\_union (Ivan Levkivskyi, PR [15216](https://github.com/python/mypy/pull/15216))
3432
+
3433
+ ### Improvements to Error Messages
3434
+
3435
+ * Use lower-case built-in collection types such as list\[…\] instead of List\[…\] in errors when targeting Python 3.9+ (Max Murin, PR [15070](https://github.com/python/mypy/pull/15070))
3436
+ * Use X | Y union syntax in error messages when targeting Python 3.10+ (Omar Silva, PR [15102](https://github.com/python/mypy/pull/15102))
3437
+ * Use type instead of Type in errors when targeting Python 3.9+ (Rohit Sanjay, PR [15139](https://github.com/python/mypy/pull/15139))
3438
+ * Do not show unused-ignore errors in unreachable code, and make it a real error code (Ivan Levkivskyi, PR [15164](https://github.com/python/mypy/pull/15164))
3439
+ * Don’t limit the number of errors shown by default (Rohit Sanjay, PR [15138](https://github.com/python/mypy/pull/15138))
3440
+ * Improver message for truthy functions (madt2709, PR [15193](https://github.com/python/mypy/pull/15193))
3441
+ * Output distinct types when type names are ambiguous (teresa0605, PR [15184](https://github.com/python/mypy/pull/15184))
3442
+ * Update message about invalid exception type in try (AJ Rasmussen, PR [15131](https://github.com/python/mypy/pull/15131))
3443
+ * Add explanation if argument type is incompatible because of an unsupported numbers type (Jukka Lehtosalo, PR [15137](https://github.com/python/mypy/pull/15137))
3444
+ * Add more detail to 'signature incompatible with supertype' messages for non-callables (Ilya Priven, PR [15263](https://github.com/python/mypy/pull/15263))
3445
+
3446
+ ### Documentation Updates
3447
+
3448
+ * Add \--local-partial-types note to dmypy docs (Alan Du, PR [15259](https://github.com/python/mypy/pull/15259))
3449
+ * Update getting started docs for mypyc for Windows (Valentin Stanciu, PR [15233](https://github.com/python/mypy/pull/15233))
3450
+ * Clarify usage of callables regarding type object in docs (Viicos, PR [15079](https://github.com/python/mypy/pull/15079))
3451
+ * Clarify difference between disallow\_untyped\_defs and disallow\_incomplete\_defs (Ilya Priven, PR [15247](https://github.com/python/mypy/pull/15247))
3452
+ * Use attrs and @attrs.define in documentation and tests (Ilya Priven, PR [15152](https://github.com/python/mypy/pull/15152))
3453
+
3454
+ ### Mypyc Improvements
3455
+
3456
+ * Fix unexpected TypeError for certain variables with an inferred optional type (Richard Si, PR [15206](https://github.com/python/mypy/pull/15206))
3457
+ * Inline math literals (Logan Hunt, PR [15324](https://github.com/python/mypy/pull/15324))
3458
+ * Support unpacking mappings in dict display (Richard Si, PR [15203](https://github.com/python/mypy/pull/15203))
3459
+
3460
+ ### Changes to Stubgen
3461
+
3462
+ * Do not remove Generic from base classes (Ali Hamdan, PR [15316](https://github.com/python/mypy/pull/15316))
3463
+ * Support yield from statements (Ali Hamdan, PR [15271](https://github.com/python/mypy/pull/15271))
3464
+ * Fix missing total from TypedDict class (Ali Hamdan, PR [15208](https://github.com/python/mypy/pull/15208))
3465
+ * Fix call-based namedtuple omitted from class bases (Ali Hamdan, PR [14680](https://github.com/python/mypy/pull/14680))
3466
+ * Support TypedDict alternative syntax (Ali Hamdan, PR [14682](https://github.com/python/mypy/pull/14682))
3467
+ * Make stubgen respect MYPY\_CACHE\_DIR (Henrik Bäärnhielm, PR [14722](https://github.com/python/mypy/pull/14722))
3468
+ * Fixes and simplifications (Ali Hamdan, PR [15232](https://github.com/python/mypy/pull/15232))
3469
+
3470
+ ### Other Notable Fixes and Improvements
3471
+
3472
+ * Fix nested async functions when using TypeVar value restriction (Jukka Lehtosalo, PR [14705](https://github.com/python/mypy/pull/14705))
3473
+ * Always allow returning Any from lambda (Ivan Levkivskyi, PR [15413](https://github.com/python/mypy/pull/15413))
3474
+ * Add foundation for TypeVar defaults (PEP 696) (Marc Mueller, PR [14872](https://github.com/python/mypy/pull/14872))
3475
+ * Update semantic analyzer for TypeVar defaults (PEP 696) (Marc Mueller, PR [14873](https://github.com/python/mypy/pull/14873))
3476
+ * Make dict expression inference more consistent (Ivan Levkivskyi, PR [15174](https://github.com/python/mypy/pull/15174))
3477
+ * Do not block on duplicate base classes (Nikita Sobolev, PR [15367](https://github.com/python/mypy/pull/15367))
3478
+ * Generate an error when both staticmethod and classmethod decorators are used (Juhi Chandalia, PR [15118](https://github.com/python/mypy/pull/15118))
3479
+ * Fix assert\_type behaviour with literals (Carl Karsten, PR [15123](https://github.com/python/mypy/pull/15123))
3480
+ * Fix match subject ignoring redefinitions (Vincent Vanlaer, PR [15306](https://github.com/python/mypy/pull/15306))
3481
+ * Support `__all__`.remove (Shantanu, PR [15279](https://github.com/python/mypy/pull/15279))
3482
+
3483
+ ### Typeshed Updates
3484
+
3485
+ Typeshed is now modular and distributed as separate PyPI packages for everything except the standard library stubs. Please see [git log](https://github.com/python/typeshed/commits/main?after=877e06ad1cfd9fd9967c0b0340a86d0c23ea89ce+0&branch=main&path=stdlib) for full list of typeshed changes.
3486
+
3487
+ ### Acknowledgements
3488
+
3489
+ Thanks to all mypy contributors who contributed to this release:
3490
+
3491
+ * Adrian Garcia Badaracco
3492
+ * AJ Rasmussen
3493
+ * Alan Du
3494
+ * Alex Waygood
3495
+ * Ali Hamdan
3496
+ * Carl Karsten
3497
+ * dosisod
3498
+ * Ethan Smith
3499
+ * Gregory Santosa
3500
+ * Heather White
3501
+ * Henrik Bäärnhielm
3502
+ * Ilya Konstantinov
3503
+ * Ilya Priven
3504
+ * Ivan Levkivskyi
3505
+ * Juhi Chandalia
3506
+ * Jukka Lehtosalo
3507
+ * Logan Hunt
3508
+ * madt2709
3509
+ * Marc Mueller
3510
+ * Max Murin
3511
+ * Nikita Sobolev
3512
+ * Omar Silva
3513
+ * Özgür
3514
+ * Richard Si
3515
+ * Rohit Sanjay
3516
+ * Shantanu
3517
+ * teresa0605
3518
+ * Thomas M Kehrenberg
3519
+ * Tin Tvrtković
3520
+ * Tushar Sadhwani
3521
+ * Valentin Stanciu
3522
+ * Viicos
3523
+ * Vincent Vanlaer
3524
+ * Wesley Collin Wright
3525
+ * William Santosa
3526
+ * yaegassy
3527
+
3528
+ I’d also like to thank my employer, Dropbox, for supporting mypy development.
3529
+
3530
+ Posted by Jared Hance
3531
+
3532
+
3533
+ ## Mypy 1.3
3534
+
3535
+ [Wednesday, 10 May 2023](https://mypy-lang.blogspot.com/2023/05/mypy-13-released.html)
3536
+
3537
+ We’ve just uploaded mypy 1.3 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
3538
+
3539
+ python3 -m pip install -U mypy
3540
+
3541
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
3542
+
3543
+ ### Performance Improvements
3544
+
3545
+ * Improve performance of union subtyping (Shantanu, PR [15104](https://github.com/python/mypy/pull/15104))
3546
+ * Add negative subtype caches (Ivan Levkivskyi, PR [14884](https://github.com/python/mypy/pull/14884))
3547
+
3548
+ ### Stub Tooling Improvements
3549
+
3550
+ * Stubtest: Check that the stub is abstract if the runtime is, even when the stub is an overloaded method (Alex Waygood, PR [14955](https://github.com/python/mypy/pull/14955))
3551
+ * Stubtest: Verify stub methods or properties are decorated with @final if they are decorated with @final at runtime (Alex Waygood, PR [14951](https://github.com/python/mypy/pull/14951))
3552
+ * Stubtest: Fix stubtest false positives with TypedDicts at runtime (Alex Waygood, PR [14984](https://github.com/python/mypy/pull/14984))
3553
+ * Stubgen: Support @functools.cached\_property (Nikita Sobolev, PR [14981](https://github.com/python/mypy/pull/14981))
3554
+ * Improvements to stubgenc (Chad Dombrova, PR [14564](https://github.com/python/mypy/pull/14564))
3555
+
3556
+ ### Improvements to attrs
3557
+
3558
+ * Add support for converters with TypeVars on generic attrs classes (Chad Dombrova, PR [14908](https://github.com/python/mypy/pull/14908))
3559
+ * Fix attrs.evolve on bound TypeVar (Ilya Konstantinov, PR [15022](https://github.com/python/mypy/pull/15022))
3560
+
3561
+ ### Documentation Updates
3562
+
3563
+ * Improve async documentation (Shantanu, PR [14973](https://github.com/python/mypy/pull/14973))
3564
+ * Improvements to cheat sheet (Shantanu, PR [14972](https://github.com/python/mypy/pull/14972))
3565
+ * Add documentation for bytes formatting error code (Shantanu, PR [14971](https://github.com/python/mypy/pull/14971))
3566
+ * Convert insecure links to use HTTPS (Marti Raudsepp, PR [14974](https://github.com/python/mypy/pull/14974))
3567
+ * Also mention overloads in async iterator documentation (Shantanu, PR [14998](https://github.com/python/mypy/pull/14998))
3568
+ * stubtest: Improve allowlist documentation (Shantanu, PR [15008](https://github.com/python/mypy/pull/15008))
3569
+ * Clarify "Using types... but not at runtime" (Jon Shea, PR [15029](https://github.com/python/mypy/pull/15029))
3570
+ * Fix alignment of cheat sheet example (Ondřej Cvacho, PR [15039](https://github.com/python/mypy/pull/15039))
3571
+ * Fix error for callback protocol matching against callable type object (Shantanu, PR [15042](https://github.com/python/mypy/pull/15042))
3572
+
3573
+ ### Error Reporting Improvements
3574
+
3575
+ * Improve bytes formatting error (Shantanu, PR [14959](https://github.com/python/mypy/pull/14959))
3576
+
3577
+ ### Mypyc Improvements
3578
+
3579
+ * Fix unions of bools and ints (Tomer Chachamu, PR [15066](https://github.com/python/mypy/pull/15066))
3580
+
3581
+ ### Other Fixes and Improvements
3582
+
3583
+ * Fix narrowing union types that include Self with isinstance (Christoph Tyralla, PR [14923](https://github.com/python/mypy/pull/14923))
3584
+ * Allow objects matching SupportsKeysAndGetItem to be unpacked (Bryan Forbes, PR [14990](https://github.com/python/mypy/pull/14990))
3585
+ * Check type guard validity for staticmethods (EXPLOSION, PR [14953](https://github.com/python/mypy/pull/14953))
3586
+ * Fix sys.platform when cross-compiling with emscripten (Ethan Smith, PR [14888](https://github.com/python/mypy/pull/14888))
3587
+
3588
+ ### Typeshed Updates
3589
+
3590
+ Typeshed is now modular and distributed as separate PyPI packages for everything except the standard library stubs. Please see [git log](https://github.com/python/typeshed/commits/main?after=b0ed50e9392a23e52445b630a808153e0e256976+0&branch=main&path=stdlib) for full list of typeshed changes.
3591
+
3592
+ ### Acknowledgements
3593
+
3594
+ Thanks to all mypy contributors who contributed to this release:
3595
+
3596
+ * Alex Waygood
3597
+ * Amin Alaee
3598
+ * Bryan Forbes
3599
+ * Chad Dombrova
3600
+ * Charlie Denton
3601
+ * Christoph Tyralla
3602
+ * dosisod
3603
+ * Ethan Smith
3604
+ * EXPLOSION
3605
+ * Ilya Konstantinov
3606
+ * Ivan Levkivskyi
3607
+ * Jon Shea
3608
+ * Jukka Lehtosalo
3609
+ * KotlinIsland
3610
+ * Marti Raudsepp
3611
+ * Nikita Sobolev
3612
+ * Ondřej Cvacho
3613
+ * Shantanu
3614
+ * sobolevn
3615
+ * Tomer Chachamu
3616
+ * Yaroslav Halchenko
3617
+
3618
+ Posted by Wesley Collin Wright.
3619
+
3620
+
3621
+ ## Mypy 1.2
3622
+
3623
+ [Thursday, 6 April 2023](https://mypy-lang.blogspot.com/2023/04/mypy-12-released.html)
3624
+
3625
+ We’ve just uploaded mypy 1.2 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
3626
+
3627
+ python3 -m pip install -U mypy
3628
+
3629
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
3630
+
3631
+ ### Improvements to Dataclass Transforms
3632
+
3633
+ * Support implicit default for "init" parameter in field specifiers (Wesley Collin Wright and Jukka Lehtosalo, PR [15010](https://github.com/python/mypy/pull/15010))
3634
+ * Support descriptors in dataclass transform (Jukka Lehtosalo, PR [15006](https://github.com/python/mypy/pull/15006))
3635
+ * Fix frozen\_default in incremental mode (Wesley Collin Wright)
3636
+ * Fix frozen behavior for base classes with direct metaclasses (Wesley Collin Wright, PR [14878](https://github.com/python/mypy/pull/14878))
3637
+
3638
+ ### Mypyc: Native Floats
3639
+
3640
+ Mypyc now uses a native, unboxed representation for values of type float. Previously these were heap-allocated Python objects. Native floats are faster and use less memory. Code that uses floating-point operations heavily can be several times faster when using native floats.
3641
+
3642
+ Various float operations and math functions also now have optimized implementations. Refer to the [documentation](https://mypyc.readthedocs.io/en/latest/float_operations.html) for a full list.
3643
+
3644
+ This can change the behavior of existing code that uses subclasses of float. When assigning an instance of a subclass of float to a variable with the float type, it gets implicitly converted to a float instance when compiled:
3645
+
3646
+ ```python
3647
+ from lib import MyFloat # MyFloat ia a subclass of "float"
3648
+
3649
+ def example() -> None:
3650
+ x = MyFloat(1.5)
3651
+ y: float = x # Implicit conversion from MyFloat to float
3652
+ print(type(y)) # float, not MyFloat
3653
+ ```
3654
+
3655
+ Previously, implicit conversions were applied to int subclasses but not float subclasses.
3656
+
3657
+ Also, int values can no longer be assigned to a variable with type float in compiled code, since these types now have incompatible representations. An explicit conversion is required:
3658
+
3659
+ ```python
3660
+ def example(n: int) -> None:
3661
+ a: float = 1 # Error: cannot assign "int" to "float"
3662
+ b: float = 1.0 # OK
3663
+ c: float = n # Error
3664
+ d: float = float(n) # OK
3665
+ ```
3666
+
3667
+ This restriction only applies to assignments, since they could otherwise narrow down the type of a variable from float to int. int values can still be implicitly converted to float when passed as arguments to functions that expect float values.
3668
+
3669
+ Note that mypyc still doesn’t support arrays of unboxed float values. Using list\[float\] involves heap-allocated float objects, since list can only store boxed values. Support for efficient floating point arrays is one of the next major planned mypyc features.
3670
+
3671
+ Related changes:
3672
+
3673
+ * Use a native unboxed representation for floats (Jukka Lehtosalo, PR [14880](https://github.com/python/mypy/pull/14880))
3674
+ * Document native floats and integers (Jukka Lehtosalo, PR [14927](https://github.com/python/mypy/pull/14927))
3675
+ * Fixes to float to int conversion (Jukka Lehtosalo, PR [14936](https://github.com/python/mypy/pull/14936))
3676
+
3677
+ ### Mypyc: Native Integers
3678
+
3679
+ Mypyc now supports signed 32-bit and 64-bit integer types in addition to the arbitrary-precision int type. You can use the types mypy\_extensions.i32 and mypy\_extensions.i64 to speed up code that uses integer operations heavily.
3680
+
3681
+ Simple example:
3682
+ ```python
3683
+ from mypy_extensions import i64
3684
+
3685
+ def inc(x: i64) -> i64:
3686
+ return x + 1
3687
+ ```
3688
+
3689
+ Refer to the [documentation](https://mypyc.readthedocs.io/en/latest/using_type_annotations.html#native-integer-types) for more information. This feature was contributed by Jukka Lehtosalo.
3690
+
3691
+ ### Other Mypyc Fixes and Improvements
3692
+
3693
+ * Support iterating over a TypedDict (Richard Si, PR [14747](https://github.com/python/mypy/pull/14747))
3694
+ * Faster coercions between different tuple types (Jukka Lehtosalo, PR [14899](https://github.com/python/mypy/pull/14899))
3695
+ * Faster calls via type aliases (Jukka Lehtosalo, PR [14784](https://github.com/python/mypy/pull/14784))
3696
+ * Faster classmethod calls via cls (Jukka Lehtosalo, PR [14789](https://github.com/python/mypy/pull/14789))
3697
+
3698
+ ### Fixes to Crashes
3699
+
3700
+ * Fix crash on class-level import in protocol definition (Ivan Levkivskyi, PR [14926](https://github.com/python/mypy/pull/14926))
3701
+ * Fix crash on single item union of alias (Ivan Levkivskyi, PR [14876](https://github.com/python/mypy/pull/14876))
3702
+ * Fix crash on ParamSpec in incremental mode (Ivan Levkivskyi, PR [14885](https://github.com/python/mypy/pull/14885))
3703
+
3704
+ ### Documentation Updates
3705
+
3706
+ * Update adopting \--strict documentation for 1.0 (Shantanu, PR [14865](https://github.com/python/mypy/pull/14865))
3707
+ * Some minor documentation tweaks (Jukka Lehtosalo, PR [14847](https://github.com/python/mypy/pull/14847))
3708
+ * Improve documentation of top level mypy: disable-error-code comment (Nikita Sobolev, PR [14810](https://github.com/python/mypy/pull/14810))
3709
+
3710
+ ### Error Reporting Improvements
3711
+
3712
+ * Add error code to `typing_extensions` suggestion (Shantanu, PR [14881](https://github.com/python/mypy/pull/14881))
3713
+ * Add a separate error code for top-level await (Nikita Sobolev, PR [14801](https://github.com/python/mypy/pull/14801))
3714
+ * Don’t suggest two obsolete stub packages (Jelle Zijlstra, PR [14842](https://github.com/python/mypy/pull/14842))
3715
+ * Add suggestions for pandas-stubs and lxml-stubs (Shantanu, PR [14737](https://github.com/python/mypy/pull/14737))
3716
+
3717
+ ### Other Fixes and Improvements
3718
+
3719
+ * Multiple inheritance considers callable objects as subtypes of functions (Christoph Tyralla, PR [14855](https://github.com/python/mypy/pull/14855))
3720
+ * stubtest: Respect @final runtime decorator and enforce it in stubs (Nikita Sobolev, PR [14922](https://github.com/python/mypy/pull/14922))
3721
+ * Fix false positives related to type\[<type-var>\] (sterliakov, PR [14756](https://github.com/python/mypy/pull/14756))
3722
+ * Fix duplication of ParamSpec prefixes and properly substitute ParamSpecs (EXPLOSION, PR [14677](https://github.com/python/mypy/pull/14677))
3723
+ * Fix line number if `__iter__` is incorrectly reported as missing (Jukka Lehtosalo, PR [14893](https://github.com/python/mypy/pull/14893))
3724
+ * Fix incompatible overrides of overloaded generics with self types (Shantanu, PR [14882](https://github.com/python/mypy/pull/14882))
3725
+ * Allow SupportsIndex in slice expressions (Shantanu, PR [14738](https://github.com/python/mypy/pull/14738))
3726
+ * Support if statements in bodies of dataclasses and classes that use dataclass\_transform (Jacek Chałupka, PR [14854](https://github.com/python/mypy/pull/14854))
3727
+ * Allow iterable class objects to be unpacked (including enums) (Alex Waygood, PR [14827](https://github.com/python/mypy/pull/14827))
3728
+ * Fix narrowing for walrus expressions used in match statements (Shantanu, PR [14844](https://github.com/python/mypy/pull/14844))
3729
+ * Add signature for attr.evolve (Ilya Konstantinov, PR [14526](https://github.com/python/mypy/pull/14526))
3730
+ * Fix Any inference when unpacking iterators that don't directly inherit from typing.Iterator (Alex Waygood, PR [14821](https://github.com/python/mypy/pull/14821))
3731
+ * Fix unpack with overloaded `__iter__` method (Nikita Sobolev, PR [14817](https://github.com/python/mypy/pull/14817))
3732
+ * Reduce size of JSON data in mypy cache (dosisod, PR [14808](https://github.com/python/mypy/pull/14808))
3733
+ * Improve “used before definition” checks when a local definition has the same name as a global definition (Stas Ilinskiy, PR [14517](https://github.com/python/mypy/pull/14517))
3734
+ * Honor NoReturn as \_\_setitem\_\_ return type to mark unreachable code (sterliakov, PR [12572](https://github.com/python/mypy/pull/12572))
3735
+
3736
+ ### Typeshed Updates
3737
+
3738
+ Typeshed is now modular and distributed as separate PyPI packages for everything except the standard library stubs. Please see [git log](https://github.com/python/typeshed/commits/main?after=a544b75320e97424d2d927605316383c755cdac0+0&branch=main&path=stdlib) for full list of typeshed changes.
3739
+
3740
+ ### Acknowledgements
3741
+
3742
+ Thanks to all mypy contributors who contributed to this release:
3743
+
3744
+ * Alex Waygood
3745
+ * Avasam
3746
+ * Christoph Tyralla
3747
+ * dosisod
3748
+ * EXPLOSION
3749
+ * Ilya Konstantinov
3750
+ * Ivan Levkivskyi
3751
+ * Jacek Chałupka
3752
+ * Jelle Zijlstra
3753
+ * Jukka Lehtosalo
3754
+ * Marc Mueller
3755
+ * Max Murin
3756
+ * Nikita Sobolev
3757
+ * Richard Si
3758
+ * Shantanu
3759
+ * Stas Ilinskiy
3760
+ * sterliakov
3761
+ * Wesley Collin Wright
3762
+
3763
+ Posted by Jukka Lehtosalo
3764
+
3765
+
3766
+ ## Mypy 1.1.1
3767
+
3768
+ [Monday, 6 March 2023](https://mypy-lang.blogspot.com/2023/03/mypy-111-released.html)
3769
+
3770
+ We’ve just uploaded mypy 1.1.1 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
3771
+
3772
+ python3 -m pip install -U mypy
3773
+
3774
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
3775
+
3776
+ ### Support for `dataclass_transform``
3777
+
3778
+ This release adds full support for the dataclass\_transform decorator defined in [PEP 681](https://peps.python.org/pep-0681/#decorator-function-example). This allows decorators, base classes, and metaclasses that generate a \_\_init\_\_ method or other methods based on the properties of that class (similar to dataclasses) to have those methods recognized by mypy.
3779
+
3780
+ This was contributed by Wesley Collin Wright.
3781
+
3782
+ ### Dedicated Error Code for Method Assignments
3783
+
3784
+ Mypy can’t safely check all assignments to methods (a form of monkey patching), so mypy generates an error by default. To make it easier to ignore this error, mypy now uses the new error code method-assign for this. By disabling this error code in a file or globally, mypy will no longer complain about assignments to methods if the signatures are compatible.
3785
+
3786
+ Mypy also supports the old error code assignment for these assignments to prevent a backward compatibility break. More generally, we can use this mechanism in the future if we wish to split or rename another existing error code without causing backward compatibility issues.
3787
+
3788
+ This was contributed by Ivan Levkivskyi (PR [14570](https://github.com/python/mypy/pull/14570)).
3789
+
3790
+ ### Fixes to Crashes
3791
+
3792
+ * Fix a crash on walrus in comprehension at class scope (Ivan Levkivskyi, PR [14556](https://github.com/python/mypy/pull/14556))
3793
+ * Fix crash related to value-constrained TypeVar (Shantanu, PR [14642](https://github.com/python/mypy/pull/14642))
3794
+
3795
+ ### Fixes to Cache Corruption
3796
+
3797
+ * Fix generic TypedDict/NamedTuple caching (Ivan Levkivskyi, PR [14675](https://github.com/python/mypy/pull/14675))
3798
+
3799
+ ### Mypyc Fixes and Improvements
3800
+
3801
+ * Raise "non-trait base must be first..." error less frequently (Richard Si, PR [14468](https://github.com/python/mypy/pull/14468))
3802
+ * Generate faster code for bool comparisons and arithmetic (Jukka Lehtosalo, PR [14489](https://github.com/python/mypy/pull/14489))
3803
+ * Optimize \_\_(a)enter\_\_/\_\_(a)exit\_\_ for native classes (Jared Hance, PR [14530](https://github.com/python/mypy/pull/14530))
3804
+ * Detect if attribute definition conflicts with base class/trait (Jukka Lehtosalo, PR [14535](https://github.com/python/mypy/pull/14535))
3805
+ * Support \_\_(r)divmod\_\_ dunders (Richard Si, PR [14613](https://github.com/python/mypy/pull/14613))
3806
+ * Support \_\_pow\_\_, \_\_rpow\_\_, and \_\_ipow\_\_ dunders (Richard Si, PR [14616](https://github.com/python/mypy/pull/14616))
3807
+ * Fix crash on star unpacking to underscore (Ivan Levkivskyi, PR [14624](https://github.com/python/mypy/pull/14624))
3808
+ * Fix iterating over a union of dicts (Richard Si, PR [14713](https://github.com/python/mypy/pull/14713))
3809
+
3810
+ ### Fixes to Detecting Undefined Names (used-before-def)
3811
+
3812
+ * Correctly handle walrus operator (Stas Ilinskiy, PR [14646](https://github.com/python/mypy/pull/14646))
3813
+ * Handle walrus declaration in match subject correctly (Stas Ilinskiy, PR [14665](https://github.com/python/mypy/pull/14665))
3814
+
3815
+ ### Stubgen Improvements
3816
+
3817
+ Stubgen is a tool for automatically generating draft stubs for libraries.
3818
+
3819
+ * Allow aliases below the top level (Chad Dombrova, PR [14388](https://github.com/python/mypy/pull/14388))
3820
+ * Fix crash with PEP 604 union in type variable bound (Shantanu, PR [14557](https://github.com/python/mypy/pull/14557))
3821
+ * Preserve PEP 604 unions in generated .pyi files (hamdanal, PR [14601](https://github.com/python/mypy/pull/14601))
3822
+
3823
+ ### Stubtest Improvements
3824
+
3825
+ Stubtest is a tool for testing that stubs conform to the implementations.
3826
+
3827
+ * Update message format so that it’s easier to go to error location (Avasam, PR [14437](https://github.com/python/mypy/pull/14437))
3828
+ * Handle name-mangling edge cases better (Alex Waygood, PR [14596](https://github.com/python/mypy/pull/14596))
3829
+
3830
+ ### Changes to Error Reporting and Messages
3831
+
3832
+ * Add new TypedDict error code typeddict-unknown-key (JoaquimEsteves, PR [14225](https://github.com/python/mypy/pull/14225))
3833
+ * Give arguments a more reasonable location in error messages (Max Murin, PR [14562](https://github.com/python/mypy/pull/14562))
3834
+ * In error messages, quote just the module's name (Ilya Konstantinov, PR [14567](https://github.com/python/mypy/pull/14567))
3835
+ * Improve misleading message about Enum() (Rodrigo Silva, PR [14590](https://github.com/python/mypy/pull/14590))
3836
+ * Suggest importing from `typing_extensions` if definition is not in typing (Shantanu, PR [14591](https://github.com/python/mypy/pull/14591))
3837
+ * Consistently use type-abstract error code (Ivan Levkivskyi, PR [14619](https://github.com/python/mypy/pull/14619))
3838
+ * Consistently use literal-required error code for TypedDicts (Ivan Levkivskyi, PR [14621](https://github.com/python/mypy/pull/14621))
3839
+ * Adjust inconsistent dataclasses plugin error messages (Wesley Collin Wright, PR [14637](https://github.com/python/mypy/pull/14637))
3840
+ * Consolidate literal bool argument error messages (Wesley Collin Wright, PR [14693](https://github.com/python/mypy/pull/14693))
3841
+
3842
+ ### Other Fixes and Improvements
3843
+
3844
+ * Check that type guards accept a positional argument (EXPLOSION, PR [14238](https://github.com/python/mypy/pull/14238))
3845
+ * Fix bug with in operator used with a union of Container and Iterable (Max Murin, PR [14384](https://github.com/python/mypy/pull/14384))
3846
+ * Support protocol inference for type\[T\] via metaclass (Ivan Levkivskyi, PR [14554](https://github.com/python/mypy/pull/14554))
3847
+ * Allow overlapping comparisons between bytes-like types (Shantanu, PR [14658](https://github.com/python/mypy/pull/14658))
3848
+ * Fix mypy daemon documentation link in README (Ivan Levkivskyi, PR [14644](https://github.com/python/mypy/pull/14644))
3849
+
3850
+ ### Typeshed Updates
3851
+
3852
+ Typeshed is now modular and distributed as separate PyPI packages for everything except the standard library stubs. Please see [git log](https://github.com/python/typeshed/commits/main?after=5ebf892d0710a6e87925b8d138dfa597e7bb11cc+0&branch=main&path=stdlib) for full list of typeshed changes.
3853
+
3854
+ ### Acknowledgements
3855
+
3856
+ Thanks to all mypy contributors who contributed to this release:
3857
+
3858
+ * Alex Waygood
3859
+ * Avasam
3860
+ * Chad Dombrova
3861
+ * dosisod
3862
+ * EXPLOSION
3863
+ * hamdanal
3864
+ * Ilya Konstantinov
3865
+ * Ivan Levkivskyi
3866
+ * Jared Hance
3867
+ * JoaquimEsteves
3868
+ * Jukka Lehtosalo
3869
+ * Marc Mueller
3870
+ * Max Murin
3871
+ * Michael Lee
3872
+ * Michael R. Crusoe
3873
+ * Richard Si
3874
+ * Rodrigo Silva
3875
+ * Shantanu
3876
+ * Stas Ilinskiy
3877
+ * Wesley Collin Wright
3878
+ * Yilei "Dolee" Yang
3879
+ * Yurii Karabas
3880
+
3881
+ We’d also like to thank our employer, Dropbox, for funding the mypy core team.
3882
+
3883
+ Posted by Max Murin
3884
+
3885
+
3886
+ ## Mypy 1.0
3887
+
3888
+ [Monday, 6 February 2023](https://mypy-lang.blogspot.com/2023/02/mypy-10-released.html)
3889
+
3890
+ We’ve just uploaded mypy 1.0 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
3891
+
3892
+ python3 -m pip install -U mypy
3893
+
3894
+ You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).
3895
+
3896
+ ### New Release Versioning Scheme
3897
+
3898
+ Now that mypy reached 1.0, we’ll switch to a new versioning scheme. Mypy version numbers will be of form x.y.z.
3899
+
3900
+ Rules:
3901
+
3902
+ * The major release number (x) is incremented if a feature release includes a significant backward incompatible change that affects a significant fraction of users.
3903
+ * The minor release number (y) is incremented on each feature release. Minor releases include updated stdlib stubs from typeshed.
3904
+ * The point release number (z) is incremented when there are fixes only.
3905
+
3906
+ Mypy doesn't use SemVer, since most minor releases have at least minor backward incompatible changes in typeshed, at the very least. Also, many type checking features find new legitimate issues in code. These are not considered backward incompatible changes, unless the number of new errors is very high.
3907
+
3908
+ Any significant backward incompatible change must be announced in the blog post for the previous feature release, before making the change. The previous release must also provide a flag to explicitly enable or disable the new behavior (whenever practical), so that users will be able to prepare for the changes and report issues. We should keep the feature flag for at least a few releases after we've switched the default.
3909
+
3910
+ See [”Release Process” in the mypy wiki](https://github.com/python/mypy/wiki/Release-Process) for more details and for the most up-to-date version of the versioning scheme.
3911
+
3912
+ ### Performance Improvements
3913
+
3914
+ Mypy 1.0 is up to 40% faster than mypy 0.991 when type checking the Dropbox internal codebase. We also set up a daily job to measure the performance of the most recent development version of mypy to make it easier to track changes in performance.
3915
+
3916
+ Many optimizations contributed to this improvement:
3917
+
3918
+ * Improve performance for errors on class with many attributes (Shantanu, PR [14379](https://github.com/python/mypy/pull/14379))
3919
+ * Speed up make\_simplified\_union (Jukka Lehtosalo, PR [14370](https://github.com/python/mypy/pull/14370))
3920
+ * Micro-optimize get\_proper\_type(s) (Jukka Lehtosalo, PR [14369](https://github.com/python/mypy/pull/14369))
3921
+ * Micro-optimize flatten\_nested\_unions (Jukka Lehtosalo, PR [14368](https://github.com/python/mypy/pull/14368))
3922
+ * Some semantic analyzer micro-optimizations (Jukka Lehtosalo, PR [14367](https://github.com/python/mypy/pull/14367))
3923
+ * A few miscellaneous micro-optimizations (Jukka Lehtosalo, PR [14366](https://github.com/python/mypy/pull/14366))
3924
+ * Optimization: Avoid a few uses of contextmanagers in semantic analyzer (Jukka Lehtosalo, PR [14360](https://github.com/python/mypy/pull/14360))
3925
+ * Optimization: Enable always defined attributes in Type subclasses (Jukka Lehtosalo, PR [14356](https://github.com/python/mypy/pull/14356))
3926
+ * Optimization: Remove expensive context manager in type analyzer (Jukka Lehtosalo, PR [14357](https://github.com/python/mypy/pull/14357))
3927
+ * subtypes: fast path for Union/Union subtype check (Hugues, PR [14277](https://github.com/python/mypy/pull/14277))
3928
+ * Micro-optimization: avoid Bogus\[int\] types that cause needless boxing (Jukka Lehtosalo, PR [14354](https://github.com/python/mypy/pull/14354))
3929
+ * Avoid slow error message logic if errors not shown to user (Jukka Lehtosalo, PR [14336](https://github.com/python/mypy/pull/14336))
3930
+ * Speed up the implementation of hasattr() checks (Jukka Lehtosalo, PR [14333](https://github.com/python/mypy/pull/14333))
3931
+ * Avoid the use of a context manager in hot code path (Jukka Lehtosalo, PR [14331](https://github.com/python/mypy/pull/14331))
3932
+ * Change various type queries into faster bool type queries (Jukka Lehtosalo, PR [14330](https://github.com/python/mypy/pull/14330))
3933
+ * Speed up recursive type check (Jukka Lehtosalo, PR [14326](https://github.com/python/mypy/pull/14326))
3934
+ * Optimize subtype checking by avoiding a nested function (Jukka Lehtosalo, PR [14325](https://github.com/python/mypy/pull/14325))
3935
+ * Optimize type parameter checks in subtype checking (Jukka Lehtosalo, PR [14324](https://github.com/python/mypy/pull/14324))
3936
+ * Speed up freshening type variables (Jukka Lehtosalo, PR [14323](https://github.com/python/mypy/pull/14323))
3937
+ * Optimize implementation of TypedDict types for \*\*kwds (Jukka Lehtosalo, PR [14316](https://github.com/python/mypy/pull/14316))
3938
+
3939
+ ### Warn About Variables Used Before Definition
3940
+
3941
+ Mypy will now generate an error if you use a variable before it’s defined. This feature is enabled by default. By default mypy reports an error when it infers that a variable is always undefined.
3942
+ ```python
3943
+ y = x # E: Name "x" is used before definition [used-before-def]
3944
+ x = 0
3945
+ ```
3946
+ This feature was contributed by Stas Ilinskiy.
3947
+
3948
+ ### Detect Possibly Undefined Variables (Experimental)
3949
+
3950
+ A new experimental possibly-undefined error code is now available that will detect variables that may be undefined:
3951
+ ```python
3952
+ if b:
3953
+ x = 0
3954
+ print(x) # Error: Name "x" may be undefined [possibly-undefined]
3955
+ ```
3956
+ The error code is disabled be default, since it can generate false positives.
3957
+
3958
+ This feature was contributed by Stas Ilinskiy.
3959
+
3960
+ ### Support the “Self” Type
3961
+
3962
+ There is now a simpler syntax for declaring [generic self types](https://mypy.readthedocs.io/en/stable/generics.html#generic-methods-and-generic-self) introduced in [PEP 673](https://peps.python.org/pep-0673/): the Self type. You no longer have to define a type variable to use “self types”, and you can use them with attributes. Example from mypy documentation:
3963
+ ```python
3964
+ from typing import Self
3965
+
3966
+ class Friend:
3967
+ other: Self | None = None
3968
+
3969
+ @classmethod
3970
+ def make_pair(cls) -> tuple[Self, Self]:
3971
+ a, b = cls(), cls()
3972
+ a.other = b
3973
+ b.other = a
3974
+ return a, b
3975
+
3976
+ class SuperFriend(Friend):
3977
+ pass
3978
+
3979
+ # a and b have the inferred type "SuperFriend", not "Friend"
3980
+ a, b = SuperFriend.make_pair()
3981
+ ```
3982
+ The feature was introduced in Python 3.11. In earlier Python versions a backport of Self is available in `typing_extensions`.
3983
+
3984
+ This was contributed by Ivan Levkivskyi (PR [14041](https://github.com/python/mypy/pull/14041)).
3985
+
3986
+ ### Support ParamSpec in Type Aliases
3987
+
3988
+ ParamSpec and Concatenate can now be used in type aliases. Example:
3989
+ ```python
3990
+ from typing import ParamSpec, Callable
3991
+
3992
+ P = ParamSpec("P")
3993
+ A = Callable[P, None]
3994
+
3995
+ def f(c: A[int, str]) -> None:
3996
+ c(1, "x")
3997
+ ```
3998
+ This feature was contributed by Ivan Levkivskyi (PR [14159](https://github.com/python/mypy/pull/14159)).
3999
+
4000
+ ### ParamSpec and Generic Self Types No Longer Experimental
4001
+
4002
+ Support for ParamSpec ([PEP 612](https://www.python.org/dev/peps/pep-0612/)) and generic self types are no longer considered experimental.
4003
+
4004
+ ### Miscellaneous New Features
4005
+
4006
+ * Minimal, partial implementation of dataclass\_transform ([PEP 681](https://peps.python.org/pep-0681/)) (Wesley Collin Wright, PR [14523](https://github.com/python/mypy/pull/14523))
4007
+ * Add basic support for `typing_extensions`.TypeVar (Marc Mueller, PR [14313](https://github.com/python/mypy/pull/14313))
4008
+ * Add \--debug-serialize option (Marc Mueller, PR [14155](https://github.com/python/mypy/pull/14155))
4009
+ * Constant fold initializers of final variables (Jukka Lehtosalo, PR [14283](https://github.com/python/mypy/pull/14283))
4010
+ * Enable Final instance attributes for attrs (Tin Tvrtković, PR [14232](https://github.com/python/mypy/pull/14232))
4011
+ * Allow function arguments as base classes (Ivan Levkivskyi, PR [14135](https://github.com/python/mypy/pull/14135))
4012
+ * Allow super() with mixin protocols (Ivan Levkivskyi, PR [14082](https://github.com/python/mypy/pull/14082))
4013
+ * Add type inference for dict.keys membership (Matthew Hughes, PR [13372](https://github.com/python/mypy/pull/13372))
4014
+ * Generate error for class attribute access if attribute is defined with `__slots__` (Harrison McCarty, PR [14125](https://github.com/python/mypy/pull/14125))
4015
+ * Support additional attributes in callback protocols (Ivan Levkivskyi, PR [14084](https://github.com/python/mypy/pull/14084))
4016
+
4017
+ ### Fixes to Crashes
4018
+
4019
+ * Fix crash on prefixed ParamSpec with forward reference (Ivan Levkivskyi, PR [14569](https://github.com/python/mypy/pull/14569))
4020
+ * Fix internal crash when resolving the same partial type twice (Shantanu, PR [14552](https://github.com/python/mypy/pull/14552))
4021
+ * Fix crash in daemon mode on new import cycle (Ivan Levkivskyi, PR [14508](https://github.com/python/mypy/pull/14508))
4022
+ * Fix crash in mypy daemon (Ivan Levkivskyi, PR [14497](https://github.com/python/mypy/pull/14497))
4023
+ * Fix crash on Any metaclass in incremental mode (Ivan Levkivskyi, PR [14495](https://github.com/python/mypy/pull/14495))
4024
+ * Fix crash in await inside comprehension outside function (Ivan Levkivskyi, PR [14486](https://github.com/python/mypy/pull/14486))
4025
+ * Fix crash in Self type on forward reference in upper bound (Ivan Levkivskyi, PR [14206](https://github.com/python/mypy/pull/14206))
4026
+ * Fix a crash when incorrect super() is used outside a method (Ivan Levkivskyi, PR [14208](https://github.com/python/mypy/pull/14208))
4027
+ * Fix crash on overriding with frozen attrs (Ivan Levkivskyi, PR [14186](https://github.com/python/mypy/pull/14186))
4028
+ * Fix incremental mode crash on generic function appearing in nested position (Ivan Levkivskyi, PR [14148](https://github.com/python/mypy/pull/14148))
4029
+ * Fix daemon crash on malformed NamedTuple (Ivan Levkivskyi, PR [14119](https://github.com/python/mypy/pull/14119))
4030
+ * Fix crash during ParamSpec inference (Ivan Levkivskyi, PR [14118](https://github.com/python/mypy/pull/14118))
4031
+ * Fix crash on nested generic callable (Ivan Levkivskyi, PR [14093](https://github.com/python/mypy/pull/14093))
4032
+ * Fix crashes with unpacking SyntaxError (Shantanu, PR [11499](https://github.com/python/mypy/pull/11499))
4033
+ * Fix crash on partial type inference within a lambda (Ivan Levkivskyi, PR [14087](https://github.com/python/mypy/pull/14087))
4034
+ * Fix crash with enums (Michael Lee, PR [14021](https://github.com/python/mypy/pull/14021))
4035
+ * Fix crash with malformed TypedDicts and disllow-any-expr (Michael Lee, PR [13963](https://github.com/python/mypy/pull/13963))
4036
+
4037
+ ### Error Reporting Improvements
4038
+
4039
+ * More helpful error for missing self (Shantanu, PR [14386](https://github.com/python/mypy/pull/14386))
4040
+ * Add error-code truthy-iterable (Marc Mueller, PR [13762](https://github.com/python/mypy/pull/13762))
4041
+ * Fix pluralization in error messages (KotlinIsland, PR [14411](https://github.com/python/mypy/pull/14411))
4042
+
4043
+ ### Mypyc: Support Match Statement
4044
+
4045
+ Mypyc can now compile Python 3.10 match statements.
4046
+
4047
+ This was contributed by dosisod (PR [13953](https://github.com/python/mypy/pull/13953)).
4048
+
4049
+ ### Other Mypyc Fixes and Improvements
4050
+
4051
+ * Optimize int(x)/float(x)/complex(x) on instances of native classes (Richard Si, PR [14450](https://github.com/python/mypy/pull/14450))
4052
+ * Always emit warnings (Richard Si, PR [14451](https://github.com/python/mypy/pull/14451))
4053
+ * Faster bool and integer conversions (Jukka Lehtosalo, PR [14422](https://github.com/python/mypy/pull/14422))
4054
+ * Support attributes that override properties (Jukka Lehtosalo, PR [14377](https://github.com/python/mypy/pull/14377))
4055
+ * Precompute set literals for "in" operations and iteration (Richard Si, PR [14409](https://github.com/python/mypy/pull/14409))
4056
+ * Don't load targets with forward references while setting up non-extension class `__all__` (Richard Si, PR [14401](https://github.com/python/mypy/pull/14401))
4057
+ * Compile away NewType type calls (Richard Si, PR [14398](https://github.com/python/mypy/pull/14398))
4058
+ * Improve error message for multiple inheritance (Joshua Bronson, PR [14344](https://github.com/python/mypy/pull/14344))
4059
+ * Simplify union types (Jukka Lehtosalo, PR [14363](https://github.com/python/mypy/pull/14363))
4060
+ * Fixes to union simplification (Jukka Lehtosalo, PR [14364](https://github.com/python/mypy/pull/14364))
4061
+ * Fix for typeshed changes to Collection (Shantanu, PR [13994](https://github.com/python/mypy/pull/13994))
4062
+ * Allow use of enum.Enum (Shantanu, PR [13995](https://github.com/python/mypy/pull/13995))
4063
+ * Fix compiling on Arch Linux (dosisod, PR [13978](https://github.com/python/mypy/pull/13978))
4064
+
4065
+ ### Documentation Improvements
4066
+
4067
+ * Various documentation and error message tweaks (Jukka Lehtosalo, PR [14574](https://github.com/python/mypy/pull/14574))
4068
+ * Improve Generics documentation (Shantanu, PR [14587](https://github.com/python/mypy/pull/14587))
4069
+ * Improve protocols documentation (Shantanu, PR [14577](https://github.com/python/mypy/pull/14577))
4070
+ * Improve dynamic typing documentation (Shantanu, PR [14576](https://github.com/python/mypy/pull/14576))
4071
+ * Improve the Common Issues page (Shantanu, PR [14581](https://github.com/python/mypy/pull/14581))
4072
+ * Add a top-level TypedDict page (Shantanu, PR [14584](https://github.com/python/mypy/pull/14584))
4073
+ * More improvements to getting started documentation (Shantanu, PR [14572](https://github.com/python/mypy/pull/14572))
4074
+ * Move truthy-function documentation from “optional checks” to “enabled by default” (Anders Kaseorg, PR [14380](https://github.com/python/mypy/pull/14380))
4075
+ * Avoid use of implicit optional in decorator factory documentation (Tom Schraitle, PR [14156](https://github.com/python/mypy/pull/14156))
4076
+ * Clarify documentation surrounding install-types (Shantanu, PR [14003](https://github.com/python/mypy/pull/14003))
4077
+ * Improve searchability for module level type ignore errors (Shantanu, PR [14342](https://github.com/python/mypy/pull/14342))
4078
+ * Advertise mypy daemon in README (Ivan Levkivskyi, PR [14248](https://github.com/python/mypy/pull/14248))
4079
+ * Add link to error codes in README (Ivan Levkivskyi, PR [14249](https://github.com/python/mypy/pull/14249))
4080
+ * Document that report generation disables cache (Ilya Konstantinov, PR [14402](https://github.com/python/mypy/pull/14402))
4081
+ * Stop saying mypy is beta software (Ivan Levkivskyi, PR [14251](https://github.com/python/mypy/pull/14251))
4082
+ * Flycheck-mypy is deprecated, since its functionality was merged to Flycheck (Ivan Levkivskyi, PR [14247](https://github.com/python/mypy/pull/14247))
4083
+ * Update code example in "Declaring decorators" (ChristianWitzler, PR [14131](https://github.com/python/mypy/pull/14131))
4084
+
4085
+ ### Stubtest Improvements
4086
+
4087
+ Stubtest is a tool for testing that stubs conform to the implementations.
4088
+
4089
+ * Improve error message for `__all__`\-related errors (Alex Waygood, PR [14362](https://github.com/python/mypy/pull/14362))
4090
+ * Improve heuristics for determining whether global-namespace names are imported (Alex Waygood, PR [14270](https://github.com/python/mypy/pull/14270))
4091
+ * Catch BaseException on module imports (Shantanu, PR [14284](https://github.com/python/mypy/pull/14284))
4092
+ * Associate exported symbol error with `__all__` object\_path (Nikita Sobolev, PR [14217](https://github.com/python/mypy/pull/14217))
4093
+ * Add \_\_warningregistry\_\_ to the list of ignored module dunders (Nikita Sobolev, PR [14218](https://github.com/python/mypy/pull/14218))
4094
+ * If a default is present in the stub, check that it is correct (Jelle Zijlstra, PR [14085](https://github.com/python/mypy/pull/14085))
4095
+
4096
+ ### Stubgen Improvements
4097
+
4098
+ Stubgen is a tool for automatically generating draft stubs for libraries.
4099
+
4100
+ * Treat dlls as C modules (Shantanu, PR [14503](https://github.com/python/mypy/pull/14503))
4101
+
4102
+ ### Other Notable Fixes and Improvements
4103
+
4104
+ * Update stub suggestions based on recent typeshed changes (Alex Waygood, PR [14265](https://github.com/python/mypy/pull/14265))
4105
+ * Fix attrs protocol check with cache (Marc Mueller, PR [14558](https://github.com/python/mypy/pull/14558))
4106
+ * Fix strict equality check if operand item type has custom \_\_eq\_\_ (Jukka Lehtosalo, PR [14513](https://github.com/python/mypy/pull/14513))
4107
+ * Don't consider object always truthy (Jukka Lehtosalo, PR [14510](https://github.com/python/mypy/pull/14510))
4108
+ * Properly support union of TypedDicts as dict literal context (Ivan Levkivskyi, PR [14505](https://github.com/python/mypy/pull/14505))
4109
+ * Properly expand type in generic class with Self and TypeVar with values (Ivan Levkivskyi, PR [14491](https://github.com/python/mypy/pull/14491))
4110
+ * Fix recursive TypedDicts/NamedTuples defined with call syntax (Ivan Levkivskyi, PR [14488](https://github.com/python/mypy/pull/14488))
4111
+ * Fix type inference issue when a class inherits from Any (Shantanu, PR [14404](https://github.com/python/mypy/pull/14404))
4112
+ * Fix false positive on generic base class with six (Ivan Levkivskyi, PR [14478](https://github.com/python/mypy/pull/14478))
4113
+ * Don't read scripts without extensions as modules in namespace mode (Tim Geypens, PR [14335](https://github.com/python/mypy/pull/14335))
4114
+ * Fix inference for constrained type variables within unions (Christoph Tyralla, PR [14396](https://github.com/python/mypy/pull/14396))
4115
+ * Fix Unpack imported from typing (Marc Mueller, PR [14378](https://github.com/python/mypy/pull/14378))
4116
+ * Allow trailing commas in ini configuration of multiline values (Nikita Sobolev, PR [14240](https://github.com/python/mypy/pull/14240))
4117
+ * Fix false negatives involving Unions and generators or coroutines (Shantanu, PR [14224](https://github.com/python/mypy/pull/14224))
4118
+ * Fix ParamSpec constraint for types as callable (Vincent Vanlaer, PR [14153](https://github.com/python/mypy/pull/14153))
4119
+ * Fix type aliases with fixed-length tuples (Jukka Lehtosalo, PR [14184](https://github.com/python/mypy/pull/14184))
4120
+ * Fix issues with type aliases and new style unions (Jukka Lehtosalo, PR [14181](https://github.com/python/mypy/pull/14181))
4121
+ * Simplify unions less aggressively (Ivan Levkivskyi, PR [14178](https://github.com/python/mypy/pull/14178))
4122
+ * Simplify callable overlap logic (Ivan Levkivskyi, PR [14174](https://github.com/python/mypy/pull/14174))
4123
+ * Try empty context when assigning to union typed variables (Ivan Levkivskyi, PR [14151](https://github.com/python/mypy/pull/14151))
4124
+ * Improvements to recursive types (Ivan Levkivskyi, PR [14147](https://github.com/python/mypy/pull/14147))
4125
+ * Make non-numeric non-empty FORCE\_COLOR truthy (Shantanu, PR [14140](https://github.com/python/mypy/pull/14140))
4126
+ * Fix to recursive type aliases (Ivan Levkivskyi, PR [14136](https://github.com/python/mypy/pull/14136))
4127
+ * Correctly handle Enum name on Python 3.11 (Ivan Levkivskyi, PR [14133](https://github.com/python/mypy/pull/14133))
4128
+ * Fix class objects falling back to metaclass for callback protocol (Ivan Levkivskyi, PR [14121](https://github.com/python/mypy/pull/14121))
4129
+ * Correctly support self types in callable ClassVar (Ivan Levkivskyi, PR [14115](https://github.com/python/mypy/pull/14115))
4130
+ * Fix type variable clash in nested positions and in attributes (Ivan Levkivskyi, PR [14095](https://github.com/python/mypy/pull/14095))
4131
+ * Allow class variable as implementation for read only attribute (Ivan Levkivskyi, PR [14081](https://github.com/python/mypy/pull/14081))
4132
+ * Prevent warnings from causing dmypy to fail (Andrzej Bartosiński, PR [14102](https://github.com/python/mypy/pull/14102))
4133
+ * Correctly process nested definitions in mypy daemon (Ivan Levkivskyi, PR [14104](https://github.com/python/mypy/pull/14104))
4134
+ * Don't consider a branch unreachable if there is a possible promotion (Ivan Levkivskyi, PR [14077](https://github.com/python/mypy/pull/14077))
4135
+ * Fix incompatible overrides of overloaded methods in concrete subclasses (Shantanu, PR [14017](https://github.com/python/mypy/pull/14017))
4136
+ * Fix new style union syntax in type aliases (Jukka Lehtosalo, PR [14008](https://github.com/python/mypy/pull/14008))
4137
+ * Fix and optimise overload compatibility checking (Shantanu, PR [14018](https://github.com/python/mypy/pull/14018))
4138
+ * Improve handling of redefinitions through imports (Shantanu, PR [13969](https://github.com/python/mypy/pull/13969))
4139
+ * Preserve (some) implicitly exported types (Shantanu, PR [13967](https://github.com/python/mypy/pull/13967))
4140
+
4141
+ ### Typeshed Updates
4142
+
4143
+ Typeshed is now modular and distributed as separate PyPI packages for everything except the standard library stubs. Please see [git log](https://github.com/python/typeshed/commits/main?after=ea0ae2155e8a04c9837903c3aff8dd5ad5f36ebc+0&branch=main&path=stdlib) for full list of typeshed changes.
4144
+
4145
+ ### Acknowledgements
4146
+
4147
+ Thanks to all mypy contributors who contributed to this release:
4148
+
4149
+ * Alessio Izzo
4150
+ * Alex Waygood
4151
+ * Anders Kaseorg
4152
+ * Andrzej Bartosiński
4153
+ * Avasam
4154
+ * ChristianWitzler
4155
+ * Christoph Tyralla
4156
+ * dosisod
4157
+ * Harrison McCarty
4158
+ * Hugo van Kemenade
4159
+ * Hugues
4160
+ * Ilya Konstantinov
4161
+ * Ivan Levkivskyi
4162
+ * Jelle Zijlstra
4163
+ * jhance
4164
+ * johnthagen
4165
+ * Jonathan Daniel
4166
+ * Joshua Bronson
4167
+ * Jukka Lehtosalo
4168
+ * KotlinIsland
4169
+ * Lakshay Bisht
4170
+ * Lefteris Karapetsas
4171
+ * Marc Mueller
4172
+ * Matthew Hughes
4173
+ * Michael Lee
4174
+ * Nick Drozd
4175
+ * Nikita Sobolev
4176
+ * Richard Si
4177
+ * Shantanu
4178
+ * Stas Ilinskiy
4179
+ * Tim Geypens
4180
+ * Tin Tvrtković
4181
+ * Tom Schraitle
4182
+ * Valentin Stanciu
4183
+ * Vincent Vanlaer
4184
+
4185
+ We’d also like to thank our employer, Dropbox, for funding the mypy core team.
4186
+
4187
+ Posted by Stas Ilinskiy
4188
+
4189
+ ## Previous releases
4190
+
4191
+ For information about previous releases, refer to the posts at https://mypy-lang.blogspot.com/