-
-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style: Fix if-else-block-instead-of-if-exp (SIM108) (part 2) #4562
style: Fix if-else-block-instead-of-if-exp (SIM108) (part 2) #4562
Conversation
…/temporal/gui_support.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of lines with:
id = input if input.find("@") >= 0 else input + "@" + mapset
Theres are maybe better written as:
id = input if "@" in input else f"{input}@{mapset}"
But I am not sure if tthat kind of changes are out of scope, so if you rather keep that separate that is fine with me...
Of course, I know about them, and the So, once this PR, and the following (ready, but not posted yet) are merged, I'll do the changes for str.find() to in. There are some instances of that pattern too if I remember well. |
Part 2 of #4561
This PR fixes SIM108 for the
scripts/*
andpython/*
foldersRuff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp