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

Apply formatting to num seconds #489

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

aguinane
Copy link

@aguinane aguinane commented Aug 9, 2024

Resolves issue #432

Copy link
Contributor

mergify bot commented Aug 9, 2024

⚠️ No release notes detected. Please make sure to use reno to add a changelog entry.

tenacity/before_sleep.py Outdated Show resolved Hide resolved
@aguinane
Copy link
Author

Updated with %.3g instead or %0.3f as the default.

@asqui
Copy link
Contributor

asqui commented Aug 15, 2024

This latest change deviates from the default format for after_log():

def after_log(
logger: "logging.Logger",
log_level: int,
sec_format: str = "%0.3f",
) -> typing.Callable[["RetryCallState"], None]:

Should we update that too, so that the two are consistent?

@jd
Copy link
Owner

jd commented Aug 19, 2024

Sounds like a good idea.

@aguinane
Copy link
Author

Made the change to after_log also.

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.

3 participants