Skip to content

refactor: decouple EmbPattern from readers/writers#123

Merged
not-my-profile merged 1 commit intoinkstitch:mainfrom
not-my-profile:decouple
Aug 2, 2025
Merged

refactor: decouple EmbPattern from readers/writers#123
not-my-profile merged 1 commit intoinkstitch:mainfrom
not-my-profile:decouple

Conversation

@not-my-profile
Copy link
Collaborator

In the reader and writer implementations we want to add EmbPattern as type hints, however when imported relatively this lead to a circular import since EmbPattern.py imported all the readers and writers.

This commit resolves this circular dependency by moving the read and write methods that select the writer depending on the file extension to init.py (as well as supported_formats and the format-specific read and write methods).

In the reader and writer implementations we want to add EmbPattern as type
hints, however when imported relatively this lead to a circular import since
EmbPattern.py imported all the readers and writers.

This commit resolves this circular dependency by moving the read and write
methods that select the writer depending on the file extension to __init__.py
(as well as supported_formats and the format-specific read and write methods).
@not-my-profile not-my-profile requested a review from kaalleen August 2, 2025 05:54
@not-my-profile not-my-profile merged commit e458fa0 into inkstitch:main Aug 2, 2025
15 checks passed
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.

2 participants