Skip to content

Conversation

@vlaci
Copy link
Contributor

@vlaci vlaci commented Dec 19, 2025

No description provided.

Based on Unblob's ruleset[^1]. I've removed a few which don't make
sense here:

- flake8-boolean-trap   -> many small CLI functions use bool flags
- flake8-logging-format -> don't use logging
- flake8-tidy-imports   -> we don't have imports to ban
Autofixed the following violations:

- examples/get_tenant_token.py:
    1 × I001 (unsorted-imports)
- examples/upload_firmware.py:
    1 × I001 (unsorted-imports)
- onekey_client/__init__.py:
    1 × I001 (unsorted-imports)
- onekey_client/cli/ci.py:
    2 × RET502 (implicit-return-value)
    2 × RUF010 (explicit-f-string-type-conversion)
    1 × F401 (unused-import)
    1 × D202 (blank-line-after-function)
    1 × I001 (unsorted-imports)
    1 × UP032 (f-string)
    1 × UP045 (non-pep604-annotation-optional)
- onekey_client/cli/cli.py:
    1 × I001 (unsorted-imports)
- onekey_client/cli/firmware_upload.py:
    2 × UP045 (non-pep604-annotation-optional)
    1 × D202 (blank-line-after-function)
    1 × I001 (unsorted-imports)
    1 × F401 (unused-import)
- onekey_client/cli/misc.py:
    2 × D202 (blank-line-after-function)
- onekey_client/client.py:
    7 × UP045 (non-pep604-annotation-optional)
    4 × UP006 (non-pep585-annotation)
    3 × F401 (unused-import)
    2 × RET505 (superfluous-else-return)
    1 × I001 (unsorted-imports)
- onekey_client/errors.py:
    1 × F401 (unused-import)
    1 × UP045 (non-pep604-annotation-optional)
- onekey_client/models.py:
    4 × UP045 (non-pep604-annotation-optional)
    1 × I001 (unsorted-imports)
    1 × F401 (unused-import)
- onekey_client/queries/utils.py:
    1 × I001 (unsorted-imports)
    1 × UP011 (lru-cache-without-parameters)
- use imperative mood
- end sentence with punctuation
- add an empty line between summary and body

Many of the affected docstrings are used in the CLI interface, but
these rules should apply to command `--help` outputs as well.
B904: use a `from` clause
RSE102: useless parentheses
@martonilles martonilles added this pull request to the merge queue Dec 19, 2025
Merged via the queue into master with commit b2cd327 Dec 19, 2025
2 checks passed
@martonilles martonilles deleted the ruffing branch December 19, 2025 17:39
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