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 11 commits into
base: main
Choose a base branch
from
Open

update pre-commit config #2683

wants to merge 11 commits 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

.pre-commit-config.yaml Outdated Show resolved Hide resolved
hooks:
- id: flake8
args: ["--exclude=lmdeploy/turbomind/triton_models/*,lmdeploy/pytorch/modeling/*", "--max-line-length=79"]
args: ["--max-line-length=120"]
- repo: https://github.com/PyCQA/isort
Copy link
Collaborator

@RunningLeon RunningLeon Jan 20, 2025

Choose a reason for hiding this comment

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

should we update --line-length=120 for isort as well? It seems the default value is 79 per here
https://github.com/PyCQA/isort/blob/1c8d963c54a6ed75d5f29e16835dcfba06bd12d3/docs/configuration/options.md#line-length

Copy link
Collaborator Author

@lvhan028 lvhan028 Jan 20, 2025

Choose a reason for hiding this comment

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

I tried. It conflicts to yapf.
isort updates the import section, which might be updated again by yapf

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