pfnet / pysen

Python linting made easy. Also a casual yet honorific way to address individuals who have entered an organization prior to you.
MIT License
487 stars 20 forks source link

`IncompatibleVersionError` with mypy 1.1.1 #32

Closed eguchi1904 closed 1 year ago

eguchi1904 commented 1 year ago

I encountered an IncompatibleVersionError when using mypy 1.1.1 through pysen 0.10.3 (the current latest version). This prevents me from upgrading mypy's version in some projects using pysen, such as onnion. It would be nice to have a new release of pysen that supports mypy 1.*.

Below is the error log I received when running pysen run lint:

...
unexpected exception
Traceback (most recent call last):
  File ".../site-packages/pysen/runner.py", line 47, in run_cmd
    exit_code = cmd.run(reporter=r)
  File ".../site-packages/pysen/command.py", line 25, in run
    return self.__call__(reporter)
  File ".../site-packages/pysen/mypy.py", line 110, in __call__
    ret = mypy_wrapper.run(
  File ".../site-packages/pysen/ext/mypy_wrapper.py", line 208, in run
    _check_mypy_version()
  File ".../site-packages/pysen/ext/mypy_wrapper.py", line 194, in _check_mypy_version
    raise IncompatibleVersionError(
pysen.exceptions.IncompatibleVersionError: pysen only supports mypy version >=0.770, <1. version 1.1.1 is not supported.

Related PR: https://github.com/pfnet/pysen/pull/31

takaiyuk commented 1 year ago

pysen 0.10.4, which was released two days ago and contains #31 changes, should solve your problem.

eguchi1904 commented 1 year ago

Indeed, the release of pysen 0.10.4 has resolved the issue 👍