-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Describe your environment
You could easily reproduce this issue by tox.
What happened?
Some code that does not conform to Python coding best practices has been detected. I have fixed the obvious parts, but there are still some issues whose impact cannot be fully assessed. Please, authors of the instrumentation code, provide some suggestions. It would be even better if these issues could be resolved.
To locate these issues, you can search for the keyword # FIXME ruff failed within the instrumentation-loongsuite directory — these are the places that need to be addressed.
Currently, I have bypassed the linting checks by adding # noqa, but this does not mean the code is correct — further evaluation is required.
- If you have a valid reason to keep the code as is, you may retain the
# noqacomment, remove the# FIXMEcomment, and add necessary comments explaining why the exception is justified. - If the issue is indeed caused by an improper design, please remove the
# noqacomment after redesigning the relevant part. It is recommended to runtox -e precommitbefore submitting to check your code.
The instrumentation modules currently affected include:
- loongsuite-instrumentation-agentscope
- loongsuite-instrumentation-agno
- loongsuite-instrumentation-dify
- loongsuite-instrumentation-langchain
- loongsuite-instrumentation-mcp
P.S. The # noqa is followed by ruff rules, which you could search on https://docs.astral.sh/ruff/rules/.
Here're the meaning of these rules:
- A001 - Variable
{name}is shadowing a Python builtin - A002 - Function argument
{name}is shadowing a Python builtin - E402 - Module level import not at top of cell
- E501 - Line too long (
{width}>{limit}) - F401 -
{name}imported but unused; consider usingimportlib.util.find_specto test for availability - F841 - Local variable
{name}is assigned to but never used
cc @sipercai @undertaker86001 @hieheihei
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.