-
Notifications
You must be signed in to change notification settings - Fork 191
chore: migrate to ruff linting and formatting #1812
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
base: master
Are you sure you want to change the base?
Conversation
| if ( | ||
| re.compile(r"^[0-9]{1,8}(\.)?([0-9]{1,8})?(btc|sat)?$").match( | ||
| amount_str.lower() | ||
| ) | ||
| is None | ||
| ): |
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.
Would something like this still pass?
| if ( | |
| re.compile(r"^[0-9]{1,8}(\.)?([0-9]{1,8})?(btc|sat)?$").match( | |
| amount_str.lower() | |
| ) | |
| is None | |
| ): | |
| if re.compile( | |
| r"^[0-9]{1,8}(\.)?([0-9]{1,8})?(btc|sat)?$" | |
| ).match(amount_str.lower()) is None: |
or
| if ( | |
| re.compile(r"^[0-9]{1,8}(\.)?([0-9]{1,8})?(btc|sat)?$").match( | |
| amount_str.lower() | |
| ) | |
| is None | |
| ): | |
| if re.compile( | |
| r"^[0-9]{1,8}(\.)?([0-9]{1,8})?(btc|sat)?$" | |
| ).match( | |
| amount_str.lower() | |
| ) is None: |
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.
I assume ruff would reformat as is. Unless you can find the appropriate option, but it doesn't look like it according to docs
Migrate to ruff linting and formatting. Formatting solely enforced to
./srcto limit review burden.I understand this PR is opinionated, opening it as a base for discussion. Hopefully everyone will agree that formatting is cumbersome and should be left to automation.