triton-inference-server / triton_cli

Triton CLI is an open source command line interface that enables users to create, deploy, and profile models served by the Triton Inference Server.
48 stars 2 forks source link

Add pre-commit hook to upgrade Python syntax #2

Closed dyastremsky closed 11 months ago

rmccorm4 commented 11 months ago

From some quick searching, I think this hook may be more popular and fully featured: https://github.com/asottile/pyupgrade, including f-string support: https://github.com/asottile/pyupgrade#f-strings

What do you think of using this one and setting >= python 3.8 features?

For this repo, I think it will be nice. For the server repo, it may have a lot of suggestions :slightly_smiling_face:

dyastremsky commented 11 months ago

From some quick searching, I think this hook may be more popular and fully featured: https://github.com/asottile/pyupgrade, including f-string support: https://github.com/asottile/pyupgrade#f-strings

What do you think of using this one and setting >= python 3.8 features?

For this repo, I think it will be nice. For the server repo, it may have a lot of suggestions 🙂

That sounds great! Hopefully pyupgrade won't play too roughly with ruff. I will swap the PR to that one.