python – How to locate the B008 error in Ruff when running with conda run ruff check

I’m using Ruff for linting in my project and encountered a B008 error when running the following command:

conda run ruff check --select B008 --statistics

It returns:

7       B008    function-call-in-default-argument

ERROR conda.cli.main_run:execute(125): `conda run ruff check --select B008 --statistics` failed. (See above for error)

However, Ruff isn’t showing me where the B008 error is located in my code, and I can’t figure out which part of the code is causing this issue. How can I find out where this error occurs so that I can resolve it? Any advice on how to make Ruff provide more details or how to manually locate the error would be greatly appreciated!

EDIT: I solved it with this command:

ruff check --select B008 . 

Read more here: Source link