Skip to content

fix: pass a format string to logging.info in dataframe_empty_handler - #292

Merged
seohyunjun merged 1 commit into
sharebook-kr:masterfrom
SAY-5:fix-dataframe-empty-handler-logging
Sep 30, 2026
Merged

seohyunjun merged 1 commit into
sharebook-kr:masterfrom
SAY-5:fix-dataframe-empty-handler-logging

Conversation

@SAY-5

@SAY-5 SAY-5 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

#291

logging.info(args, kwargs) passes the wrapper's args tuple as the message and kwargs as the single positional arg instead of a format string, so formatting the record can raise TypeError: not all arguments converted during string formatting from inside the logging module itself. Every caught exception in a decorated function ends up printing a confusing second traceback. Switched to logging.info("args=%r kwargs=%r", args, kwargs).

@seohyunjun

Copy link
Copy Markdown
Collaborator

@SAY-5

Thanks a lot for the fix and for adding a regression test — this cleanly closes out #291, and the test nicely captures the original TypeError that used to get swallowed by logging's internal error handling. 🙏

ruff check --config pyproject.toml .
ruff format --check --config pyproject.toml .

locally and push a fix for whatever it flags? If ruff format --check is the one complaining, ruff format --config pyproject.toml . should auto-fix it. Let us know if the failure doesn't reproduce locally (Ruff version drift between local and CI is always a possibility since it isn't pinned in the workflow) — happy to help dig into it further.

Thanks again for the contribution!

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@SAY-5
SAY-5 force-pushed the fix-dataframe-empty-handler-logging branch from 6480e70 to 4171ca1 Compare September 25, 2026 16:54
@SAY-5

SAY-5 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

The lint failure was ruff 0.16 reformatting code blocks in the markdown files (README, CONTRIBUTING, tests/README, copilot-instructions), not the two files in this PR. Master already has those reformatted, so I rebased onto it and ruff check / ruff format --check are clean with 0.16.9 locally.

@seohyunjun

seohyunjun commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

LGTM, Thanks for the 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

2 participants