mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #163] [MERGED] [cleanup] Import every name from its canonical module #165
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#165
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/163
Author: @Glitchy-Sheep
Created: 8/19/2026
Status: ✅ Merged
Merged: 8/19/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:chore/canonical-imports📝 Commits (1)
ae14b17chore: Import every name from its canonical module📊 Changes
10 files changed (+17 additions, -23 deletions)
View changed files
📝
boosty_downloader/src/application/di/app_environment.py(+1 -1)📝
boosty_downloader/src/application/mappers/__init__.py(+0 -3)📝
boosty_downloader/src/application/mappers/external_video.py(+1 -1)📝
boosty_downloader/src/application/mappers/file.py(+1 -1)📝
boosty_downloader/src/application/mappers/html_converter.py(+1 -1)📝
boosty_downloader/src/application/mappers/image.py(+1 -1)📝
boosty_downloader/src/application/mappers/ok_boosty_video.py(+1 -1)📝
boosty_downloader/src/application/use_cases/check_total_posts.py(+1 -1)📝
boosty_downloader/src/application/use_cases/download_single_post.py(+6 -9)📝
boosty_downloader/src/application/use_cases/download_specific_post.py(+4 -4)📄 Description
[cleanup] Import every name from its canonical module
Summary
Second cleanup PR (audit этап 2). Pure import mechanics, zero behavior change: every name now comes from the module that defines it, and the one real import cycle in the package is gone.
Problem
BoostyAPIClientwas imported via a sibling use case, an application error via another use case, a domain type via the HTML converter - deleting an "unused" import line in one file silently broke anothermappers/__init__andpost_mapperimported each other; the cycle survived only thanks to CPython's partial-init fallback, one reordering away from a hardImportErrorRichLoggertype dragged inlogger_instances, a module that mutatessys.stdoutat import timeFix
post_data_chunks, thedomain.postunion hub keeps onlyPostand the unionspost_mapper;post_mapperkeeps the readablemappers.to_domain_*namespace style, and its consumers import it from its own moduleRichLoggercomes fromloggers.base- no import-time side effects for a typeVerification
task cigreen: checks, 174 tests + 1 xfail, e2e, buildmappersverified explicitly - no cycle by constructionci/skip-changelog)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.