Skip to content

chore: lint hygiene for examples folder #118

Open
qlrd wants to merge 1 commit into
diybitcoinhardware:masterfrom
qlrd:ci/chore-code-quality
Open

chore: lint hygiene for examples folder #118
qlrd wants to merge 1 commit into
diybitcoinhardware:masterfrom
qlrd:ci/chore-code-quality

Conversation

@qlrd
Copy link
Copy Markdown
Contributor

@qlrd qlrd commented May 7, 2026

This PR partially supersede #98 and introduces a set of small code-quality changes
(mostly lint and import sorting ones) on examples/**/*.py

Copilot AI review requested due to automatic review settings May 7, 2026 19:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces CI code-quality gates while applying a broad set of small, mostly non-functional formatting/lint cleanups across the Python codebase (src/liquid/descriptor/etc.) plus a few spelling/identifier corrections.

Changes:

  • Add a new GitHub Actions workflow to enforce isort, ruff format, pylint, and typos.
  • Apply import ordering / formatting normalizations across many modules and examples.
  • Fix minor typos and a few identifier names (e.g., “leafs”→“leaves”, “desciptor”→“descriptor”, has_hardendhas_hardened).

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/embit/wordlists/uslip39.py Reorders imports for lint/format consistency.
src/embit/wordlists/ubip39.py Reorders imports for lint/format consistency.
src/embit/wordlists/base.py Minor tuple-unpacking style cleanup.
src/embit/util/key.py Import ordering cleanup.
src/embit/util/ctypes_secp256k1.py Import splitting/reordering for style tools.
src/embit/transaction.py Import grouping cleanup.
src/embit/slip39.py Import ordering cleanup.
src/embit/script.py Import consolidation/reordering.
src/embit/psbtview.py Refactors hashing imports/usages and minor spelling/variable name cleanups.
src/embit/psbt.py Import consolidation/reordering and minor comment spelling.
src/embit/networks.py Normalizes hex byte literals’ casing.
src/embit/misc.py Import ordering in MicroPython branch.
src/embit/liquid/transaction.py Import reordering/consolidation.
src/embit/liquid/slip77.py Adds blank line after imports (formatting).
src/embit/liquid/psetview.py Import ordering (move hashlib up).
src/embit/liquid/pset.py Import reordering and formatting of a conditional expression.
src/embit/liquid/networks.py Normalizes hex byte literals’ casing.
src/embit/liquid/finalizer.py Import ordering cleanup.
src/embit/liquid/descriptor.py Import ordering/consolidation.
src/embit/liquid/blip32.py Import ordering cleanup.
src/embit/liquid/addresses.py Import ordering cleanup.
src/embit/finalizer.py Import ordering cleanup.
src/embit/ec.py Import reordering (stdlib before local).
src/embit/descriptor/taptree.py Import ordering and tuple-unpacking style cleanup.
src/embit/descriptor/miniscript.py Import ordering cleanup.
src/embit/descriptor/descriptor.py Import ordering and variable rename leafsleaves.
src/embit/descriptor/checksum.py Fixes docstring typo (“desciptor”→“descriptor”).
src/embit/descriptor/base.py Adds blank line after imports (formatting).
src/embit/descriptor/arguments.py Import ordering and rename has_hardendhas_hardened.
src/embit/descriptor/init.py Import ordering cleanup.
src/embit/compact.py Docstring formatting normalization.
src/embit/bip85.py Import ordering cleanup.
src/embit/bip39.py Fixes comment typo (“convertion”→“conversion”) and import ordering.
src/embit/bip32.py Import consolidation/reordering.
src/embit/bech32.py Adds blank line after docstring (formatting).
src/embit/base58.py Adds blank line after imports (formatting).
src/embit/base.py Import ordering (stdlib vs local).
examples/explorer.py Formatting of a conditional expression for style tools.
examples/change.py Adds blank line after docstring/imports (formatting).
.github/workflows/code-quality.yml Adds CI code-quality workflow (isort/ruff-format/pylint/typos).
_typos.toml Adds typos configuration and exclusions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/code-quality.yml Outdated
Comment thread .github/workflows/code-quality.yml Outdated
Comment thread src/embit/descriptor/arguments.py
@qlrd qlrd force-pushed the ci/chore-code-quality branch 2 times, most recently from e11ceb2 to e369e55 Compare May 7, 2026 20:01
Copilot AI review requested due to automatic review settings May 7, 2026 20:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.

Comment thread src/embit/descriptor/arguments.py Outdated
@qlrd qlrd force-pushed the ci/chore-code-quality branch 2 times, most recently from 3cbd8c8 to 4e7e019 Compare May 7, 2026 20:09
Copilot AI review requested due to automatic review settings May 7, 2026 20:43
@qlrd qlrd force-pushed the ci/chore-code-quality branch from 4e7e019 to 0e94c69 Compare May 7, 2026 20:43
@qlrd qlrd changed the title Ci/chore code quality ci: chore and code quality May 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 72 out of 72 changed files in this pull request and generated no new comments.

@qlrd qlrd marked this pull request as ready for review May 7, 2026 20:47
@qlrd qlrd marked this pull request as draft May 12, 2026 11:58
@qlrd qlrd force-pushed the ci/chore-code-quality branch from 0e94c69 to 6f3331c Compare May 12, 2026 12:44
Comment thread .github/workflows/code-quality.yml Fixed
Comment thread .github/workflows/code-quality.yml Fixed
Comment thread examples/psbt.py Fixed
Comment thread examples/transactions.py Fixed
Comment thread src/embit/liquid/finalizer.py Fixed
Comment thread src/embit/liquid/pset.py Fixed
Comment thread src/embit/liquid/pset.py Fixed
Comment thread src/embit/liquid/transaction.py Fixed
Copilot AI review requested due to automatic review settings May 12, 2026 13:03
@qlrd qlrd force-pushed the ci/chore-code-quality branch from 6f3331c to 1119ba5 Compare May 12, 2026 13:03
@qlrd qlrd force-pushed the ci/chore-code-quality branch from 1119ba5 to 97c2c15 Compare May 12, 2026 13:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 71 out of 71 changed files in this pull request and generated 3 comments.

Comment thread src/embit/psbt.py Outdated
Comment thread src/embit/liquid/pset.py Outdated
Comment thread src/embit/liquid/pset.py Outdated
This commit introduces a set of small code-quality changes
(mostly lint and import sorting ones) on `examples/**/*.py`.
@qlrd qlrd force-pushed the ci/chore-code-quality branch from 97c2c15 to fd23c6d Compare May 12, 2026 13:40
@qlrd qlrd changed the title ci: chore and code quality chore: commit hygiene for examples folder May 12, 2026
@qlrd qlrd changed the title chore: commit hygiene for examples folder chore: lint hygiene for examples folder May 12, 2026
@qlrd qlrd marked this pull request as ready for review May 12, 2026 13:44
@qlrd qlrd requested review from miketlk and odudex as code owners May 12, 2026 13:44
Copilot AI review requested due to automatic review settings May 12, 2026 13:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread examples/psbt.py
Comment on lines 1 to +5
# base64 encoding
from binascii import a2b_base64, b2a_base64
from binascii import a2b_base64, b2a_base64, hexlify

from embit import bip32, bip39, psbt, script
from embit.networks import NETWORKS
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.

3 participants