Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add __main__.py for using with python -m #1197

Merged
merged 4 commits into from
Dec 16, 2024
Merged

Conversation

glensc
Copy link
Contributor

@glensc glensc commented Dec 11, 2024

This allows easily run the program from source tree after installing dependencies:

$ pip install -e .
$ python -m subliminal --help

Adopted from:

This allows easily run the program from source tree after installing
dependencies:

$ pip install -e .
$ python -m subliminal --help
@getzze
Copy link
Collaborator

getzze commented Dec 12, 2024

Thanks for the PR! It looks good to me, just need to fix ruff warnings:

  • ruff automatically gets rid of print statements, just add this line as the first line of the file.
# ruff: noqa: T201
  • you need to add a docstring to the file.

@getzze getzze merged commit b8853ee into Diaoul:main Dec 16, 2024
23 checks passed
@glensc glensc deleted the add-main branch December 20, 2024 18:41
@glensc
Copy link
Contributor Author

glensc commented Dec 20, 2024

what does it mean, gets rid of print statements, what should one use then?

@getzze
Copy link
Collaborator

getzze commented Dec 20, 2024

It is to remove print statement that have been added for debugging and forgot to remove them.
It can be quite useful :)

If you really need a print (like here), you can add an exception to ruff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants