From b885165e8da5ca5ca270389767c8ea52f28849f5 Mon Sep 17 00:00:00 2001 From: galv Date: Mon, 10 Jun 2024 21:16:58 +0000 Subject: [PATCH] Apply isort and black reformatting Signed-off-by: galv --- setup.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 28378f440c131..180e5ab4f0833 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,9 @@ elif os.path.exists('README.rst'): # codec is used for consistent encoding long_description = codecs.open( - os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst'), 'r', encoding='utf-8', + os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst'), + 'r', + encoding='utf-8', ).read() long_description_content_type = "text/x-rst" @@ -95,12 +97,43 @@ def req_file(filename, folder="requirements"): # Add lightning requirements as needed extras_require['common'] = list(chain([extras_require['common'], extras_require['core']])) -extras_require['test'] = list(chain([extras_require['tts'], extras_require['core'], extras_require['common'],])) +extras_require['test'] = list( + chain( + [ + extras_require['tts'], + extras_require['core'], + extras_require['common'], + ] + ) +) extras_require['asr'] = list(chain([extras_require['asr'], extras_require['core'], extras_require['common']])) -extras_require['nlp'] = list(chain([extras_require['nlp'], extras_require['core'], extras_require['common'],])) -extras_require['tts'] = list(chain([extras_require['tts'], extras_require['core'], extras_require['common'],])) +extras_require['nlp'] = list( + chain( + [ + extras_require['nlp'], + extras_require['core'], + extras_require['common'], + ] + ) +) +extras_require['tts'] = list( + chain( + [ + extras_require['tts'], + extras_require['core'], + extras_require['common'], + ] + ) +) extras_require['multimodal'] = list( - chain([extras_require['multimodal'], extras_require['nlp'], extras_require['core'], extras_require['common'],]) + chain( + [ + extras_require['multimodal'], + extras_require['nlp'], + extras_require['core'], + extras_require['common'], + ] + ) ) # TTS has extra dependencies @@ -132,7 +165,8 @@ def __call_checker(self, base_command, scope, check): command.extend(['--check', '--diff']) self.announce( - msg='Running command: %s' % str(' '.join(command)), level=distutils_log.INFO, + msg='Running command: %s' % str(' '.join(command)), + level=distutils_log.INFO, ) return_code = subprocess.call(command) @@ -140,10 +174,18 @@ def __call_checker(self, base_command, scope, check): return return_code def _isort(self, scope, check): - return self.__call_checker(base_command=self.__ISORT_BASE.split(), scope=scope, check=check,) + return self.__call_checker( + base_command=self.__ISORT_BASE.split(), + scope=scope, + check=check, + ) def _black(self, scope, check): - return self.__call_checker(base_command=self.__BLACK_BASE.split(), scope=scope, check=check,) + return self.__call_checker( + base_command=self.__BLACK_BASE.split(), + scope=scope, + check=check, + ) def _pass(self): self.announce(msg='\033[32mPASS\x1b[0m', level=distutils_log.INFO)