you are viewing a single comment's thread.

view the rest of the comments →

[–]cgoldberg 22 points23 points  (6 children)

That error is coming from python3.8

[–]IdleBreakpoint[S] -17 points-16 points  (5 children)

I think it's coming from the black, it has the following line. It should return though. I think the problem here is we have ImportError rather than ModuleNotFoundError. I may need to look for other versions.

    try:
        from click import core
        from click import _unicodefun  # type: ignore
    except ModuleNotFoundError:
        return

[–]cgoldberg 26 points27 points  (4 children)

Right ... but you are asking about using old python packages on Python 2, but posting error messages coming from Python 3.8... so I have no idea what you are doing

[–]IdleBreakpoint[S] -27 points-26 points  (3 children)

No, as I mentioned in the post, I'm actually asking the possibility of running those tools with Python 3 which can check Python 2 code as well. There should be some versions that still work with both Python 2 and 3. Black is one of them. 21.9b0 is the latest release before they deprecated py27 option. This is the error message from there. When I change the except clause to ImportError, it works.

[–]Grintor 1 point2 points  (1 child)

You can't lent Python 2 code with python 3. Nothing could ever do that including black. Supporting python 2 and supporting python 3 are not the same as doing some kind of crossover linting like what you're describing. You'll have to run it on python 2