Open lqllife opened 1 month ago
ruff when unconfigured use this as the default configuration so I would say that is a good starting point.
ruff when unconfigured use this as the default configuration so I would say that is a good starting point.
Thank you. I want to know, what is the more reasonable configuration in actual development?
That's a very loaded question, which people debate all the time. I would say the one specified by black, which I believe is also the ruff default is one of the most widely used.
That's a very loaded question, which people debate all the time. I would say the one specified by black, which I believe is also the ruff default is one of the most widely used.
It's true, could you please share your configuration?
I always use this configuration: https://github.com/astral-sh/ruff/issues/11415
With tools like these, I start with everything (select = ["ALL"]
) then remove stuff as I find issues or disagree with their reasoning. I also get to learn a lot by reading their doc as they come up in my code. Then end up with a config looking something like this: https://github.com/BesLogic/shared-configs/blob/main/ruff.toml
https://github.com/astral-sh/ruff/issues/12352 / https://github.com/astral-sh/ruff/discussions/3363#discussioncomment-7266932 would be nice to make it easy to share a config once you settle on something you like.
I just started using ruff and never used black before, so I want to ask if there are any standard, commonly used and easy-to-use rules. I searched for a long time in the issue but couldn't find it, so I'm asking. Please give me some ready-made rules, preferably with some brief descriptions, thank you. Here are my pyproject.toml configuration.