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

update pre-commit config #2683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

update pre-commit config #2683

wants to merge 1 commit into from

Conversation

lvhan028
Copy link
Collaborator

Motivation

"--max-line-length=79" is inappropriate for lmdeploy

Changes

refer to mmcv, mmdetection and opencompass to update pre-commit config

hooks:
- id: flake8
args: ["--exclude=lmdeploy/turbomind/triton_models/*,lmdeploy/pytorch/modeling/*", "--max-line-length=79"]
args: ["--exclude=lmdeploy/pytorch/modeling/*"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

直接删掉是否会出现代码极长这种,可能会比较难看?要不要设置一个比较大的,比如 vscode 的 editor.rulers 推荐的分别是 80 和 120。

Copy link
Collaborator

@RunningLeon RunningLeon Oct 30, 2024

Choose a reason for hiding this comment

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

新环境里试了下,pre-commit 还是会报E501,貌似pep8默认要求就是79

lmdeploy/pytorch/models/deepseek_v2.py:11:80: E501 line too long (114 > 79 characters)
lmdeploy/pytorch/models/deepseek_v2.py:21:80: E501 line too long (121 > 79 characters)
lmdeploy/pytorch/models/deepseek_v2.py:23:1: E302 expected 2 blank lines, found 1

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