chore: lint hygiene for examples folder #118
Open
qlrd wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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, andtypos. - 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_hardend→has_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 leafs→leaves. |
| 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_hardend→has_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.
1 task
e11ceb2 to
e369e55
Compare
3cbd8c8 to
4e7e019
Compare
4e7e019 to
0e94c69
Compare
0e94c69 to
6f3331c
Compare
6f3331c to
1119ba5
Compare
1119ba5 to
97c2c15
Compare
This commit introduces a set of small code-quality changes (mostly lint and import sorting ones) on `examples/**/*.py`.
97c2c15 to
fd23c6d
Compare
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR partially supersede #98 and introduces a set of small code-quality changes
(mostly lint and import sorting ones) on
examples/**/*.py