jspahrsummers / adt

Algebraic data types for Python (experimental, not actively maintained)
MIT License
172 stars 14 forks source link

fix TypeError in mypy plugin with mypy==0.812 #43

Closed alexmusa closed 3 years ago

alexmusa commented 3 years ago

A quick fix for issue https://github.com/jspahrsummers/adt/issues/42

jspahrsummers commented 3 years ago

Thank you for the pull request! :sparkles: Two quick questions:

  1. Does this work on the previous versions of mypy as well (that were working before)?
  2. Can you please update requirements.txt to reflect the new supported version?
alexmusa commented 3 years ago
  1. Does this work on the previous versions of mypy as well (that were working before)?

My tests only went as far as running script/test with both mypy 0.812 and 0.761 as well as running mypy on my code base. They ran as expected with the exception of test_issue25 and test_issue26 unexpectedly succeding with mypy==0.812 :

test_issue25 (tests.test_mypy_plugin.TestMyPyPlugin) ... Testing issue25.py with mypy==0.812
Success: no issues found in 1 source file
unexpected success
test_issue26 (tests.test_mypy_plugin.TestMyPyPlugin) ... Testing issue26.py with mypy==0.812
Success: no issues found in 1 source file
unexpected success
  1. Can you please update requirements.txt to reflect the new supported version?

Will do shortly

jspahrsummers commented 3 years ago

Thank you for fixing this! I'll release 0.2.1 with your changes shortly.