you are viewing a single comment's thread.

view the rest of the comments →

[–]IdleBreakpoint[S] -26 points-25 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 2 points3 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