Skip to content

Conversation

@roshii
Copy link
Contributor

@roshii roshii commented Oct 25, 2025

Migrate to ruff linting and formatting. Formatting solely enforced to ./src to 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.

Comment on lines +50 to +55
if (
re.compile(r"^[0-9]{1,8}(\.)?([0-9]{1,8})?(btc|sat)?$").match(
amount_str.lower()
)
is None
):
Copy link

@3nprob 3nprob Oct 26, 2025

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?

Suggested change
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

Suggested change
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:

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants