Fix flake8 warnings and ignore VNE001 for Python samples (#18204)

* Ignore VNE001 for Python samples

* Add explanation

* Fix flake8 on wheel setup.py

* Fix onnx test reporting VNE001
This commit is contained in:
Jan Iwaszkiewicz 2023-06-23 15:06:02 +02:00 committed by GitHub
parent d00c7d30f9
commit a8ce60b651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -3,9 +3,10 @@
# D100 - Missing docstring in public module
# D101 - Missing docstring in public class
# D103 - Missing docstring in public function
# VNE001 - Single letter variable names are not allowed
filename = *.py
max-line-length = 160
ignore = E203,D100,D101,D103
ignore = E203,D100,D101,D103,VNE001
max-parameters-amount = 8
show_source = True
docstring-convention = google

View File

@ -412,7 +412,7 @@ def test_split_1d():
def test_depth_to_space():
b, c, h, w = shape = (2, 8, 3, 3)
b, c, h, w = shape = (2, 8, 3, 3) # noqa: VNE001
blocksize = 2
data = np.random.random_sample(shape).astype(np.float32)
tmp = np.reshape(data, [b, blocksize, blocksize, c // (blocksize ** 2), h, w])

View File

@ -220,7 +220,7 @@ class CustomBuild(build):
("cmake-args=", None, "Additional options to be passed to CMake."),
("python-extensions-only", None, "Install Python extensions without C++ libraries."),
]
boolean_options = build.boolean_options + ['python-extensions-only']
boolean_options = build.boolean_options + ["python-extensions-only"]
def initialize_options(self):
"""Set default values for all the options that this command supports."""
@ -436,7 +436,7 @@ class CopyExt(build_ext):
user_options = [
("skip-rpath", None, "Skips RPATH for Python extensions."),
]
boolean_options = ['skip_rpath']
boolean_options = ["skip_rpath"]
def initialize_options(self):
"""Set default values for all the options that this command supports."""