Skip to content

Commit

Permalink
Apply line-length=120 formatting to existing files
Browse files Browse the repository at this point in the history
  • Loading branch information
softwareengineerprogrammer committed Oct 12, 2023
1 parent 977536a commit 49976c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion ci/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def main():
# This uses sys.executable the same way that the call in
# cookiecutter-pylibrary/hooks/post_gen_project.py
# invokes this bootstrap.py itself.
for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], universal_newlines=True).splitlines()
for line in subprocess.check_output(
[sys.executable, '-m', 'tox', '--listenvs'], universal_newlines=True
).splitlines()
]
tox_environments = [line for line in tox_environments if line.startswith('py')]
for template in templates_path.rglob('*'):
Expand Down
12 changes: 9 additions & 3 deletions src/geophires_x_client/geophires_x_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ def _get_result_field(self, field):
return None

if len(matching_lines) > 1:
self._logger.warning(f'Found multiple ({len(matching_lines)}) entries for field: {field}\n\t{matching_lines}')
self._logger.warning(
f'Found multiple ({len(matching_lines)}) entries for field: {field}\n\t{matching_lines}'
)

matching_line = matching_lines.pop()
val_and_unit_str = re.sub(r'\s\s+', '', matching_line.replace(f'{field}:', '').replace('\n', ''))
Expand All @@ -247,7 +249,9 @@ def _get_metadata_field(self, metadata_field):
return None

if len(matching_lines) > 1:
self._logger.warning(f'Found multiple ({len(matching_lines)}) entries for metadata field: {metadata_field}\n\t{matching_lines}')
self._logger.warning(
f'Found multiple ({len(matching_lines)}) entries for metadata field: {metadata_field}\n\t{matching_lines}'
)

return matching_lines.pop().split(metadata_marker)[1].replace('\n', '')

Expand Down Expand Up @@ -319,7 +323,9 @@ def _parse_number(self, number_str, field='string'):

def _get_end_use_option(self) -> EndUseOption:
try:
end_use_option_snippet = list(filter(lambda x: 'End-Use Option: ' in x, self._lines))[0].split('End-Use Option: ')[1]
end_use_option_snippet = list(filter(lambda x: 'End-Use Option: ' in x, self._lines))[0].split(
'End-Use Option: '
)[1]

if 'Direct-Use Heat' in end_use_option_snippet:
return EndUseOption.DIRECT_USE_HEAT
Expand Down
4 changes: 3 additions & 1 deletion tests/test_HIP_RA.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def test_HIP_RA_examples(self):
example_files = self._list_test_files_dir(test_files_dir='examples')

def get_output_file_for_example(example_file: str):
return self._get_test_file_path(Path('examples', f'{example_file.split(".txt")[0].capitalize()}V3_output.txt'))
return self._get_test_file_path(
Path('examples', f'{example_file.split(".txt")[0].capitalize()}V3_output.txt')
)

for example_file_path in example_files:
if example_file_path.startswith('HIPexample') and '_output' not in example_file_path:
Expand Down

0 comments on commit 49976c6

Please sign in to comment.