temporalio / sdk-python

Temporal Python SDK
MIT License
473 stars 77 forks source link

Use ruff to auto-format code and sort imports. #566

Closed dandavison closed 5 months ago

dandavison commented 5 months ago

Use ruff to auto-format code and sort imports. This PR does not switch to using ruff as a general Python linter.

After merge, we could add the commit to https://git-scm.com/docs/git-blame#Documentation/git-blame.txt-blameignoreRevsFile

dandavison commented 5 months ago

Ready for review, except for the failing 3.8 ubuntu-latest which seems to be autoformatting generated protos and I haven't worked out why yet.

cretz commented 5 months ago

In addition to the comment about formatting generated protos, I also wonder if ruff can help us detect unused imports (haven't researched). I know imports have side-effects but surely there's some comment we can put around the false positives.