From: Edward Yang Date: Fri, 8 Mar 2019 22:30:15 +0000 (-0800) Subject: Fix lint in run_test.py X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~915 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4bea15f580af5aa3e1bda4d56f077a4472745f17;p=platform%2Fupstream%2Fpytorch.git Fix lint in run_test.py Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17815 Reviewed By: eellison Differential Revision: D14390308 fbshipit-source-id: 22efd62a1bbd1fc8155a942d7160d5b7d3158e6b --- diff --git a/test/run_test.py b/test/run_test.py index c82fa31..42a0d54 100644 --- a/test/run_test.py +++ b/test/run_test.py @@ -91,8 +91,8 @@ THD_DISTRIBUTED_TESTS_CONFIG = { } # https://stackoverflow.com/questions/2549939/get-signal-names-from-numbers-in-python -SIGNALS_TO_NAMES_DICT = dict((getattr(signal, n), n) for n in dir(signal) - if n.startswith('SIG') and '_' not in n) +SIGNALS_TO_NAMES_DICT = {getattr(signal, n): n for n in dir(signal) + if n.startswith('SIG') and '_' not in n} CPP_EXTENSIONS_ERROR = """ Ninja (https://ninja-build.org) must be available to run C++ extensions tests,