forked from metaopt/torchopt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add flake8 plugins and enable pre-commit hook (metaopt#138)
- Loading branch information
Showing
15 changed files
with
105 additions
and
26 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
max-doc-length = 100 | ||
select = B,C,E,F,W,Y,SIM | ||
ignore = | ||
# E203: whitespace before ':' | ||
# W503: line break before binary operator | ||
# W504: line break after binary operator | ||
# format by black | ||
E203,W503,W504, | ||
# E501: line too long | ||
# W505: doc line too long | ||
# too long docstring due to long example blocks | ||
E501,W505, | ||
per-file-ignores = | ||
# F401: module imported but unused | ||
# intentionally unused imports | ||
__init__.py: F401 | ||
# F401: module imported but unused | ||
# F403: unable to detect undefined names | ||
# F405: member mey be undefined, or defined from star imports | ||
# members populated from optree | ||
torchopt/pytree.py: F401,F403,F405 | ||
# E301: expected 1 blank line | ||
# E302: expected 2 blank lines | ||
# E305: expected 2 blank lines after class or function definition | ||
# E701: multiple statements on one line (colon) | ||
# E704: multiple statements on one line (def) | ||
# format by black | ||
*.pyi: E301,E302,E305,E701,E704 | ||
exclude = | ||
.git, | ||
.vscode, | ||
venv, | ||
third-party, | ||
__pycache__, | ||
docs/source/conf.py, | ||
build, | ||
dist, | ||
examples, | ||
tests |
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
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 |
---|---|---|
|
@@ -15,8 +15,6 @@ | |
|
||
# pylint: disable=all | ||
|
||
from __future__ import annotations | ||
|
||
import torch | ||
|
||
def forward_( | ||
|
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
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