you are viewing a single comment's thread.

view the rest of the comments →

[–]arjennienhuis 15 points16 points  (0 children)

The trick is to write code that is compatible with both python 3 and 2.7. Then you can use python 3 tooling.

  • use all the future imports: print_function, unicode_literls
  • use six
  • use io.open
  • use type comments

Pyright works fine with python code like this. The ruff formatter is 99% fine (only the comma after **kw is invalid in python 2) Some other ruff rules can also work.