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

[Small] Formatter only checks lints in changed files #1528

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

cadedaniel
Copy link
Collaborator

There are many lint failures which makes new ones easy to miss. This PR makes the linter by default only check changed files using the same logic as used for yapf.

Testing

$ ./format.sh --files vllm/block.py
vLLM yapf: Done
vLLM Pylint:

------------------------------------
Your code has been rated at 10.00/10
$ echo '# long line------------------------------------------------------------------------' >> vllm/block.py
$ ./format.sh
vLLM yapf: Done
vLLM Pylint:
************* Module vllm.block
vllm/block.py:71:0: C0301: Line too long (83/80) (line-too-long)

-----------------------------------
Your code has been rated at 9.70/10
$ ./format.sh --all
vLLM yapf: Done
vLLM Pylint:
************* Module vllm.model_executor.models.internlm
vllm/model_executor/models/internlm.py:265:24: E1136: Value 'state_dict' is unsubscriptable (unsubscriptable-object)
vllm/model_executor/models/internlm.py:275:24: E1136: Value 'state_dict' is unsubscriptable (unsubscriptable-object)
vllm/model_executor/models/internlm.py:293:24: E1136: Value 'state_dict' is unsubscriptable (unsubscriptable-object)
vllm/model_executor/models/internlm.py:307:20: E1136: Value 'state_dict' is unsubscriptable (unsubscriptable-object)
************* Module vllm.model_executor.models.qwen
vllm/model_executor/models/qwen.py:296:24: E1136: Value 'state_dict' is unsubscriptable (unsubscriptable-object)
vllm/model_executor/models/qwen.py:309:20: E1136: Value 'state_dict' is unsubscriptable (unsubscriptable-object)
[rest omitted]

Copy link
Collaborator

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for your contribution!

@zhuohan123 zhuohan123 merged commit e575df3 into vllm-project:main Oct 31, 2023
2 checks passed
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
sjchoi1 pushed a commit to casys-kaist-internal/vllm that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants