-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ci/mypy-literals
- Loading branch information
Showing
7 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,30 @@ | ||
#!/bin/sh | ||
|
||
DIR_TO_CHECK=${1} | ||
|
||
echo "running flake8" | ||
flake8 \ | ||
--ignore=E501,W503 \ | ||
--exclude=./.nuget,./external_libs,./python-package/build,./python-package/compile \ | ||
"${DIR_TO_CHECK}" \ | ||
--config=./python-package/setup.cfg \ | ||
. \ | ||
|| exit -1 | ||
echo "done running flake8" | ||
|
||
echo "running pydocstyle" | ||
pydocstyle \ | ||
--convention=numpy \ | ||
--add-ignore=D105 \ | ||
--match-dir="^(?!^external_libs|test|example).*" \ | ||
--match="(?!^test_|setup).*\.py" \ | ||
"${DIR_TO_CHECK}" \ | ||
--config=./python-package/pyproject.toml \ | ||
. \ | ||
|| exit -1 | ||
echo "done running pydocstyle" | ||
|
||
echo "running isort" | ||
isort \ | ||
--check-only \ | ||
"${DIR_TO_CHECK}" \ | ||
--settings-path=./python-package/pyproject.toml \ | ||
. \ | ||
|| exit -1 | ||
echo "done running isort" | ||
|
||
echo "running mypy" | ||
mypy \ | ||
--ignore-missing-imports \ | ||
--exclude 'build/' \ | ||
--exclude 'compile/' \ | ||
--exclude 'docs/' \ | ||
--exclude 'examples/' \ | ||
--exclude 'external_libs/' \ | ||
--exclude 'tests/' \ | ||
"${DIR_TO_CHECK}/python-package" \ | ||
--config-file=./python-package/pyproject.toml \ | ||
./python-package \ | ||
|| true | ||
echo "done running mypy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[tool.isort] | ||
line_length = 120 | ||
skip_glob = [ | ||
"external_libs/*", | ||
"lightgbm-python/*" | ||
] | ||
|
||
[tool.mypy] | ||
exclude = 'build/*|compile/*|docs/*|examples/*|external_libs/*|lightgbm-python/*|tests/*' | ||
ignore_missing_imports = true | ||
|
||
[tool.pydocstyle] | ||
add_ignore = [ | ||
'D105' | ||
] | ||
convention = 'numpy' | ||
match = '(?!^test_|setup).*\.py' | ||
match_dir = '^(?!^external_libs|lightgbm-python|test|example).*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[flake8] | ||
ignore = | ||
# line too long | ||
E501, | ||
# line break occurred before a binary operator | ||
W503 | ||
exclude = | ||
./.nuget, | ||
./external_libs, | ||
./lightgbm-python, | ||
./python-package/build, | ||
./python-package/compile |