-
Notifications
You must be signed in to change notification settings - Fork 48
feat: add configuration files for project setup with Poetry and pre-c… #23
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[settings] | ||
# skip_glob=.mypy_cache | ||
# skip_glob=.venv | ||
# skip_glob=.git | ||
# skip=.git, .mypy_cache, .venv | ||
profile=black | ||
skip_gitignore=True |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
fail_fast: false | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: system | ||
name: Black | ||
entry: black . | ||
pass_filenames: false | ||
language: system | ||
|
||
- repo: local | ||
hooks: | ||
- id: system | ||
name: ruff | ||
entry: ruff check . | ||
args: [ --fix, --show-fixes ] | ||
pass_filenames: false | ||
language: system | ||
|
||
- repo: local | ||
hooks: | ||
- id: system | ||
name: isort | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个isort是需要把tushare那个库给ignore掉,因为默认导入tushare会有默认logging格式冲突的问题(reader那个目录) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👌🏻 |
||
entry: isort . | ||
pass_filenames: false | ||
language: system | ||
|
||
- repo: local | ||
hooks: | ||
- id: system | ||
name: pylint | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pylint这个会强制开发者执行么?毕竟fork的人比较多,让他们提交不了估计要炸毛 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 只有执行过 |
||
entry: pylint -d W1203,W1309,C0114,W0718,C0116,C0115 app | ||
pass_filenames: false | ||
language: system | ||
|
||
- repo: local | ||
hooks: | ||
- id: system | ||
name: mypy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 那个xtquant文件夹是复制进来的第三方库,需要ignore掉 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👌🏻 |
||
entry: mypy --ignore-missing-imports app | ||
pass_filenames: false | ||
language: system |
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.
ruff跟isort是不是功能有重叠,保留一个就行?