Skip to content

Remove unused imports and fix re-exports (F401)#556

Open
Mubashir78 wants to merge 2 commits into
Breakthrough:mainfrom
Mubashir78:main
Open

Remove unused imports and fix re-exports (F401)#556
Mubashir78 wants to merge 2 commits into
Breakthrough:mainfrom
Mubashir78:main

Conversation

@Mubashir78

Copy link
Copy Markdown

Remove unused imports across the codebase flagged by Ruff rule F401. Uses explicit re-exports in init.py to preserve the public API.

@Breakthrough

Copy link
Copy Markdown
Owner

Thanks for the PR. Let me think about this for a bit - I'm not sure if I want to commit to the duplicate from x import y as y style, or if we should use __all__ instead to reduce duplication.

@Mubashir78

Copy link
Copy Markdown
Author

In my opinion, good practice is to be explicit about imports, and making sure those imports are used. Lines of code does not matter if it can make the parts clearer. To simply use __all__ is an abstraction which would be confusing to other people in the long run.

Comment thread scenedetect/backends/__init__.py Outdated
@Mubashir78

Copy link
Copy Markdown
Author

Done, added re-exports for VideoStreamCv2, VideoStreamAv, and VideoStreamMoviePy.

@Breakthrough

Copy link
Copy Markdown
Owner

Last ask, can you rebase + update to export the new items I added for v0.7.1? Thanks for the PR BTW.

@Breakthrough Breakthrough force-pushed the main branch 2 times, most recently from ab2d6f2 to c1fcb79 Compare July 6, 2026 02:58
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