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

Add "reinstall()" method to make it easier in spawn multiprocessing #1069

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

monchin
Copy link

@monchin monchin commented Jan 20, 2024

Make it easier when using loguru in spawn multiprocessing environment

@monchin
Copy link
Author

monchin commented Jan 20, 2024

It seems black does not check docstring's length.

@Delgan
Copy link
Owner

Delgan commented Jan 21, 2024

Thanks for the PR @monchin!

However, I'm going to wait a little before merging it, because there are quite a few special cases I'd like to think about and a lot of unit tests that need to be implemented. I'll probably make some commits after yours to complete the development, if you're OK with that.

It seems black does not check docstring's length.

Indeed, docstrings are not automatically formatted by black, we have to do it manually.

loguru/_logger.py Outdated Show resolved Hide resolved
loguru/_logger.py Outdated Show resolved Hide resolved
tests/test_multiprocessing.py Outdated Show resolved Hide resolved
loguru/_logger.py Outdated Show resolved Hide resolved
@monchin
Copy link
Author

monchin commented Jan 22, 2024

I'm not familiar with ruff, seems it failed because I created a new tests/test_reinstall.py file

@Delgan
Copy link
Owner

Delgan commented Jan 22, 2024

Thanks for the update.

I'm not familiar with ruff, seems it failed because I created a new tests/test_reinstall.py file

Similarly to black, the ruff tool notably replaces isort and is in charge of re-ordering the import statements.

You can try to install the pre-commit hooks to automatically fix your files before git commit:

$ pre-commit install --install-hooks

Or you can manually fix the file with:

$ ruff tests/test_reinstall.py --fix

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.

None yet

2 participants