Skip to content

Commit

Permalink
update pylintrc
Browse files Browse the repository at this point in the history
  • Loading branch information
yongwww committed Apr 20, 2023
1 parent da9e5e3 commit dbd1a95
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 58 deletions.
20 changes: 10 additions & 10 deletions ci/jenkins/docker-images.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

# This data file is read during when Jenkins runs job to determine docker images.
[jenkins]
ci_arm: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_arm:PR-14635-4aff2348d-8
ci_cortexm: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_cortexm:PR-14635-000b69f97-8
ci_cpu: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_cpu:PR-14635-000b69f97-8
ci_gpu: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_gpu:PR-14635-3752f89a4-8
ci_hexagon: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_hexagon:PR-14635-65474dfd8-8
ci_i386: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_i386:PR-14635-000b69f97-8
ci_lint: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_lint:PR-14635-ba315f8f8-8
ci_minimal: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_minimal:PR-14635-000b69f97-8
ci_riscv: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_riscv:PR-14635-f7e2954a3-8
ci_wasm: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_wasm:PR-14635-0f69ae82e-8
ci_arm: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_arm:PR-14635-e0e3aa634-9
ci_cortexm: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_cortexm:PR-14635-51d8d5009-9
ci_cpu: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_cpu:PR-14635-2bf472c7e-9
ci_gpu: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_gpu:PR-14635-8430bc2ac-9
ci_hexagon: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_hexagon:PR-14635-51d8d5009-9
ci_i386: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_i386:PR-14635-812d0e129-9
ci_lint: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_lint:PR-14635-812d0e129-9
ci_minimal: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_minimal:PR-14635-84f9d8d85-9
ci_riscv: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_riscv:PR-14635-2bf472c7e-9
ci_wasm: 477529581014.dkr.ecr.us-west-2.amazonaws.com/ci_wasm:PR-14635-812d0e129-9
48 changes: 7 additions & 41 deletions tests/lint/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ unsafe-load-any-extension=no
# run arbitrary code
extension-pkg-whitelist=numpy,opencv

# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality. This option is deprecated
# and it will be removed in Pylint 2.0.
optimize-ast=no


[MESSAGES CONTROL]

# Only show warnings with the listed confidence levels. Leave empty to show
Expand Down Expand Up @@ -116,12 +106,6 @@ disable=
# mypackage.mymodule.MyReporterClass.
output-format=parseable

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]". This option is deprecated
# and it will be removed in Pylint 2.0.
files-output=no

# Tells whether to display a full report or only the messages
reports=no

Expand Down Expand Up @@ -149,12 +133,6 @@ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# else.
single-line-if-stmt=no

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator

# Maximum number of lines in a module
max-module-lines=1500

Expand Down Expand Up @@ -286,62 +264,50 @@ property-classes=abc.abstractproperty
# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
const-naming-style=snake_case

# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$

# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
inlinevar-naming-style=snake_case

# Regular expression matching correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for method names
method-name-hint=[a-z_][a-z0-9_]{2,30}$
method-naming-style=snake_case

# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
class-attribute-naming-style=snake_case

# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for argument names
argument-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for attribute names
attr-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for variable names
variable-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,48}$

# Naming hint for function names
function-name-hint=[a-z_][a-z0-9_]{2,48}$
function-naming-style=snake_case

# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$

# Naming hint for class names
class-name-hint=[A-Z_][a-zA-Z0-9]+$
class-naming-style=PascalCase

# Regular expression which should only match function or class names that do
# not require a docstring.
Expand Down Expand Up @@ -445,4 +411,4 @@ max-bool-expr=5

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtins.Exception
13 changes: 7 additions & 6 deletions tests/scripts/task_config_build_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,20 @@ echo set\(USE_LLVM llvm-config-15\) >> config.cmake
echo set\(USE_NNPACK ON\) >> config.cmake
echo set\(NNPACK_PATH /NNPACK/build/\) >> config.cmake
echo set\(USE_ANTLR ON\) >> config.cmake
echo set\(CMAKE_CXX_FLAGS -Werror\) >> config.cmake
echo set\(CMAKE_CXX_FLAGS \"-Werror -Wno-error=range-loop-construct\"\) >> config.cmake
echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake
echo set\(USE_VTA_TSIM ON\) >> config.cmake
echo set\(USE_VTA_FSIM ON\) >> config.cmake

# This conditional is just to support the transition to cope
# with the change in the way TFLite is built. It can be
# removed once we migrate to TensorFlow and TFLite > 2.9.1
if [ -d "/opt/tflite" ]; then
echo set\(USE_TFLITE \"/opt/tflite\"\) >> config.cmake
else
echo set\(USE_TFLITE ON\) >> config.cmake
fi
# TODO (yongwww): enable this with new images once it's ready
# if [ -d "/opt/tflite" ]; then
# echo set\(USE_TFLITE \"/opt/tflite\"\) >> config.cmake
# else
# echo set\(USE_TFLITE ON\) >> config.cmake
# fi

echo set\(USE_TENSORFLOW_PATH \"/tensorflow\"\) >> config.cmake
echo set\(USE_FLATBUFFERS_PATH \"/flatbuffers\"\) >> config.cmake
Expand Down
1 change: 0 additions & 1 deletion tests/scripts/task_config_build_i386.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ echo set\(USE_LLVM llvm-config-10\) >> config.cmake
echo set\(CMAKE_CXX_FLAGS -Werror\) >> config.cmake
echo set\(USE_VTA_FSIM ON\) >> config.cmake
echo set\(USE_VTA_TSIM ON\) >> config.cmake
echo set\(USE_VERILATOR ON\) >> config.cmake
echo set\(USE_CCACHE OFF\) >> config.cmake
echo set\(BACKTRACE_ON_SEGFAULT ON\) >> config.cmake
echo set\(USE_UMA OFF\) >> config.cmake
Expand Down

0 comments on commit dbd1a95

Please sign in to comment.