Skip to content

nit: fix line-length in pyproject.toml for ruff #95

@johnlettman

Description

@johnlettman

RE: #91 (comment)

Currently, ruff does not function due to an error in pyproject.toml specifying the line length as 512:
https://github.com/prusa3d/OpenPrintTag/blob/0085062bc77de93e725267eb02becfcd0b5f5492/pyproject.toml#L1-L2

I am not 100% sure why the check passes CI/CD, but locally ruff is definitely broken, even though pre-commit passes.

Local test of ruff and pre-commit

pre-commit run --show-diff-on-failure --color=always --all-files

Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check Yaml...............................................................Passed
Check for added large files..............................................Passed
ruff-format..............................................................Passed

And, directly run using the command from the hook:

ruff check --force-exclude

ruff failed
  Cause: Failed to parse /home/jlettman/repos/pr-prusa3d-openprinttag/pyproject.toml
  Cause: TOML parse error at line 2, column 15
  |
2 | line-length = 512
  |               ^^^
line-length must be between 1 and 320 (got 512)

I suspect, as a result, the ruff check might not actually be running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions