Skip to content

Commit

Permalink
keep formatting consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed Aug 16, 2024
1 parent 81c19ac commit 864d66d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions catalog_reader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,21 @@ def get_app_details_impl(

return item_data


def new_line_to_space(text: str) -> str:
return text.replace('\n', ' ')


def get_app_version_details(
version_path: str, questions_context: typing.Optional[dict], options: typing.Optional[dict] = None
) -> dict:
options = options or {}
version_data = {'location': version_path, 'required_features': set()}
for key, filename, parser, post_processor in (
("app_metadata", "app.yaml", yaml.safe_load, None),
("schema", "questions.yaml", yaml.safe_load, None),
("readme", "README.md", markdown.markdown, new_line_to_space),
("changelog", "CHANGELOG.md", markdown.markdown, new_line_to_space),
('app_metadata', 'app.yaml', yaml.safe_load, None),
('schema', 'questions.yaml', yaml.safe_load, None),
('readme', 'README.md', markdown.markdown, new_line_to_space),
('changelog', 'CHANGELOG.md', markdown.markdown, new_line_to_space),
):
if os.path.exists(os.path.join(version_path, filename)):
with open(os.path.join(version_path, filename), 'r') as f:
Expand Down

0 comments on commit 864d66d

Please sign in to comment.