Skip to content

Ruff linting#58

Open
maarten-ic wants to merge 3 commits into
developfrom
ruff-linting
Open

Ruff linting#58
maarten-ic wants to merge 3 commits into
developfrom
ruff-linting

Conversation

@maarten-ic

Copy link
Copy Markdown
Collaborator

Enable additional ruff linting rules

Most changes are trivial, but please check if you agree with my solution for the base ymmsl.document.Document class:

  • Rules triggered by ruff:
    1. B024 Document is an abstract base class, but it has no abstract methods or properties
    2. B027 Document.__init__ is an empty method in an abstract base class, but has no abstract decorator
  • I tried making __init__ an abstract method (and add a concrete __init__ method to ymmsl.v0_1.document.Document) but then mypy complains: ymmsl/io.py:34: error: Only concrete class can be given where "type[Document]" is expected [type-abstract]
    So instead I completely removed the ABC superclass from document.Document.

Suggested to review commit-by-commit and don't spend too much time at the import sorting commit 🙂

@maarten-ic maarten-ic requested a review from LourensVeen June 19, 2026 08:41
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.

1 participant