Skip to content

Run ruff and fix issues? #410

@DimitriPapadopoulos

Description

@DimitriPapadopoulos

Would you be willing to fix issues reported by ruff?

$ ruff --ignore 'E501,F405,F403' .
docs/conf.py:14:1: E401 Multiple imports on one line
docs/conf.py:14:8: F401 [*] `sys` imported but unused
docs/conf.py:14:13: F401 [*] `os` imported but unused
stdnum/ec/ci.py:50:5: E731 [*] Do not assign a `lambda` expression, use a `def`
stdnum/nz/bankaccount.py:94:42: E741 Ambiguous variable name: `l`
stdnum/pt/cc.py:64:5: E731 [*] Do not assign a `lambda` expression, use a `def`
Found 6 errors.
[*] 4 potentially fixable with the --fix option.
$ 

From a pitch seen elsewhere: "Ruff supports over 500 lint rules including bandit, isort, pylint, pyupgrade, and flake8 plus its plugins and is written in Rust for speed".

I could start by fixing these issues, and then maybe attempt to move CI tests to ruff instead of flake8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions