diff --git a/.circleci/scripts/upload_binary_size_to_scuba.py b/.circleci/scripts/upload_binary_size_to_scuba.py index 0c8992453ef63..2c8d2939284d4 100644 --- a/.circleci/scripts/upload_binary_size_to_scuba.py +++ b/.circleci/scripts/upload_binary_size_to_scuba.py @@ -17,7 +17,7 @@ def get_size(file_dir): # we should only expect one file, if no, something is wrong file_name = glob.glob(os.path.join(file_dir, "*"))[0] return os.stat(file_name).st_size - except: + except Exception: logging.exception(f"error getting file from: {file_dir}") return 0 @@ -145,5 +145,5 @@ def gen_messages(): if size != 0: try: send_message([build_message(size)]) - except: + except Exception: logging.exception("can't send message") diff --git a/.flake8 b/.flake8 index 0b058328f55e1..d93dfb73b7e9b 100644 --- a/.flake8 +++ b/.flake8 @@ -14,20 +14,18 @@ ignore = C400,C401,C402,C403,C404,C405,C407,C411,C413,C414,C415 per-file-ignores = __init__.py: F401 torch/utils/cpp_extension.py: B950 exclude = - docs/src, - docs/cpp/src, - venv, - third_party, - caffe2, - scripts, - docs/caffe2, - torch/lib/include, - torch/lib/tmp_install, - build, - torch/include, - *.pyi, - .git, - build, - build_test_custom_build, - build_code_analyzer, - test/generated_type_hints_smoketest.py + ./.git, + ./build_code_analyzer, + ./build_test_custom_build, + ./build, + ./caffe2, + ./docs/caffe2, + ./docs/cpp/src, + ./docs/src, + ./scripts, + ./test/generated_type_hints_smoketest.py, + ./third_party, + ./torch/include, + ./torch/lib, + ./venv, + *.pyi diff --git a/test/scripts/run_cuda_memcheck.py b/test/scripts/run_cuda_memcheck.py index 2541e4bff48f0..5e95914599ec5 100755 --- a/test/scripts/run_cuda_memcheck.py +++ b/test/scripts/run_cuda_memcheck.py @@ -108,7 +108,7 @@ def is_cpu_only(name): # create a fake progress bar that does not display anything class ProgressbarStub: - def update(*args): + def update(self, *args): return progressbar = ProgressbarStub()