Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

chore: migrate to ruff linting and formatting#1812

Open
roshii wants to merge 3 commits intoJoinMarket-Org:masterfrom
roshii:ci/format
Open

chore: migrate to ruff linting and formatting#1812
roshii wants to merge 3 commits intoJoinMarket-Org:masterfrom
roshii:ci/format

Conversation

@roshii
Copy link
Copy Markdown
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 thread src/jmclient/taker.py Dismissed
Comment thread src/jmclient/taker.py Dismissed
Comment thread src/jmbitcoin/amount.py
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
Copy Markdown

@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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants