Skip to content

Bring mgds to OneTrainer code standards#53

Open
BitcrushedHeart wants to merge 2 commits into
Nerogar:masterfrom
BitcrushedHeart:fix/pipelinemodule-forward-ref
Open

Bring mgds to OneTrainer code standards#53
BitcrushedHeart wants to merge 2 commits into
Nerogar:masterfrom
BitcrushedHeart:fix/pipelinemodule-forward-ref

Conversation

@BitcrushedHeart

@BitcrushedHeart BitcrushedHeart commented May 17, 2026

Copy link
Copy Markdown
Contributor

Small cleanup pass to align mgds with the lint/type-check standards used in OneTrainer:

  • Resolve LoadingPipeline forward reference in PipelineModule via TYPE_CHECKING import (was unresolvable to type checkers and would NameError under typing.get_type_hints()).
  • Fix MGDS.__init__ annotation definition: [PipelineModule]list[PipelineModule] (the list literal is not a valid type).
  • Clear all ruff check violations: unused imports (MGDS, ImageToVideo), not(x in y)x not in y (DropTags), unused as e on a re-raised exception (LoadVideo), and an unused path_names local (PipelineModule).

Pure cleanup — no behavior changes.

- Remove unused imports (MGDS, ImageToVideo)
- Use `s not in xs` instead of `not(s in xs)` (DropTags)
- Drop unused `as e` from re-raised exception (LoadVideo)
- Drop unused `path_names` local (PipelineModule)
- Fix `definition: [PipelineModule]` annotation to `list[PipelineModule]` (MGDS)
@BitcrushedHeart BitcrushedHeart changed the title Resolve LoadingPipeline forward reference in PipelineModule Bring mgds to OneTrainer code standards May 17, 2026
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