-
Notifications
You must be signed in to change notification settings - Fork 54
LCORE-303: fixed all remaining pylint issues #241
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
LCORE-303: fixed all remaining pylint issues #241
Conversation
WalkthroughThe changes introduce updates to several unit test files, focusing on code style and documentation improvements. These include adding or updating module and class docstrings, reordering import statements, renaming a pytest fixture, specifying file encoding, and adding or adjusting pylint directives. No functional code or test logic was modified. Changes
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
tests/unit/auth/test_k8s.py (1)
3-3: Consider narrowing pylint disablesDisabling four different message IDs at the file level (
too-many-arguments,too-many-positional-arguments,too-few-public-methods,protected-access) silences potentially valuable warnings across the whole module.
If only specific functions trigger these, prefer either:# pylint: disable=too-many-arguments def helper(...): ...or targeted pragmas on the offending lines to keep the lint signal high.
tests/unit/utils/test_types.py (2)
1-1: Spelling error in module docstring
functionns➜functions-"""Unit tests for functionns defined in utils/types.py.""" +"""Unit tests for functions defined in utils/types.py."""
9-10: Spelling error in class docstringSame typo inside the class-level docstring:
-"""Unit tests for functionns defined in utils/types.py.""" +"""Unit tests for functions defined in utils/types.py."""
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
tests/unit/auth/test_k8s.py(1 hunks)tests/unit/utils/test_checks.py(1 hunks)tests/unit/utils/test_common.py(1 hunks)tests/unit/utils/test_suid.py(1 hunks)tests/unit/utils/test_types.py(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
tests/unit/utils/test_types.py (1)
src/utils/types.py (3)
GraniteToolParser(23-37)get_parser(33-37)get_tool_calls(26-30)
🔇 Additional comments (3)
tests/unit/utils/test_suid.py (1)
1-1: Docstring addition looks goodThe concise module-level description clarifies test scope and satisfies pylint’s
missing-module-docstring. Nothing else to add.tests/unit/utils/test_common.py (1)
6-6: Import re-ordering LGTM
pytestis now grouped beneath standard-library imports, which removes pylint’swrong-import-orderwithout altering behaviour.tests/unit/utils/test_checks.py (1)
1-16: Docstring, encoding and fixture rename approvedThe added docstring, explicit UTF-8 encoding, and clearer fixture name resolve the pylint complaints cleanly without affecting test behaviour.
| assert not tool_parser.get_tool_calls( | ||
| completion_message | ||
| ), "get_tool_calls should return []" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assertion became too permissive
assert not tool_parser.get_tool_calls(... ) passes for [], None, False, or any falsy value, whereas the previous equality check guaranteed an empty list.
To keep the test strict and reduce false negatives, revert to explicit list comparison:
-assert not tool_parser.get_tool_calls(completion_message)
+assert tool_parser.get_tool_calls(completion_message) == []Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In tests/unit/utils/test_types.py around lines 38 to 40, the assertion uses
'assert not' which passes for any falsy value, not just an empty list. Change
the assertion back to explicitly compare the result of
tool_parser.get_tool_calls(completion_message) to an empty list using '== []' to
ensure the test strictly checks for an empty list.
Description
LCORE-303: fixed all remaining pylint issues
Type of change
Related Tickets & Documents
Summary by CodeRabbit