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

Spurious logging-too-many-args (PLE1205) if using the msg kwarg #6454

Closed
adamtheturtle opened this issue Aug 9, 2023 · 1 comment · Fixed by #6456
Closed

Spurious logging-too-many-args (PLE1205) if using the msg kwarg #6454

adamtheturtle opened this issue Aug 9, 2023 · 1 comment · Fixed by #6456
Assignees
Labels
bug Something isn't working

Comments

@adamtheturtle
Copy link

logging.info, logging.warning, logging.error, etc. each take (msg, *args, **kwargs).
If msg is given as a keyword argument, ruff 0.0.283 gives an error (https://beta.ruff.rs/docs/rules/logging-too-many-args/), which is incorrect.

# example.py

import logging

logging.info(msg="X")
ruff --select=PLE --isolated example.py
example.py:3:1: PLE1205 Too many arguments for `logging` format string
@charliermarsh
Copy link
Member

Thanks, will get this fixed shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants