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

cleanup prints #19

Closed
wants to merge 7 commits into from
Closed

cleanup prints #19

wants to merge 7 commits into from

Conversation

alik-git
Copy link
Contributor

@alik-git alik-git commented Dec 8, 2024

use logging instead of prints

use logging instead of prints
@alik-git alik-git requested a review from codekansas December 8, 2024 00:14
return 1

return 0
logging.error(f"Error: {e}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i thought i disabled f-strings in logging in pylint... this is not ideal, see here: https://pylint.readthedocs.io/en/stable/user_guide/messages/warning/logging-fstring-interpolation.html

@@ -38,5 +36,7 @@ def main(args):
parser.add_argument("-o", "--output-file", type=str, help="Output KRec file path (optional)")
parser.add_argument("-v", "--verbose", action="store_true", help="Enable verbose output")

logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, you can add colorlogging as a dependency, it is a small package i wrote to make it easy to configure nice logging: https://pypi.org/project/colorlogging/

setup.py Outdated
@@ -60,6 +60,7 @@ def run(self) -> None:
),
],
setup_requires=["setuptools-rust"],
install_requires=["colorlogging"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put into requirements.txt not here

@alik-git
Copy link
Contributor Author

alik-git commented Dec 9, 2024

I've merged this branch into combine_mkv_overwrite_by_default so we can ignore this branch going forward.

@alik-git alik-git closed this Dec 17, 2024
@alik-git alik-git deleted the cleanup-prints branch December 17, 2024 23:10
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