Skip to content

Commit

Permalink
Apply isort and black reformatting
Browse files Browse the repository at this point in the history
Signed-off-by: galv <[email protected]>
  • Loading branch information
galv committed Jun 13, 2024
1 parent df12a59 commit 97bf74c
Showing 1 changed file with 50 additions and 8 deletions.
58 changes: 50 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -132,18 +165,27 @@ 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)

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)
Expand Down

0 comments on commit 97bf74c

Please sign in to comment.