Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _render_log():
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config["types"]
fragments, fragment_filenames = find_fragments(
pathlib.Path(config["directory"]).absolute(),
config["sections"],
None,
definitions,
)
project_options = {
"name": config["package"],
"version": _read_text_version(),
"date": datetime.date.today().isoformat(),
}
rendered = render_fragments(
pathlib.Path(config["template"]).read_text(encoding="utf-8"),
config["issue_format"],
split_fragments(fragments, definitions),
definitions,
config["underlines"][1:],
def _render_log():
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config["types"]
fragments, fragment_filenames = find_fragments(
pathlib.Path(config["directory"]).absolute(),
config["sections"],
None,
definitions,
)
rendered = render_fragments(
pathlib.Path(config["template"]).read_text(encoding="utf-8"),
config["issue_format"],
split_fragments(fragments, definitions),
definitions,
config["underlines"][1:],
False, # Don't add newlines to wrapped text.
)
return rendered
def _render_log():
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config["types"]
fragments, fragment_filenames = find_fragments(
pathlib.Path(config["directory"]).absolute(),
config["sections"],
None,
definitions,
)
rendered = render_fragments(
pathlib.Path(config["template"]).read_text(encoding="utf-8"),
config["issue_format"],
split_fragments(fragments, definitions),
definitions,
config["underlines"][1:],
False, # Don't add newlines to wrapped text.
)
return rendered
def _render_log():
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config["types"]
fragments, fragment_filenames = find_fragments(
pathlib.Path(config["directory"]).absolute(),
config["sections"],
None,
definitions,
)
rendered = render_fragments(
pathlib.Path(config["template"]).read_text(encoding="utf-8"),
config["issue_format"],
split_fragments(fragments, definitions),
definitions,
config["underlines"][1:],
False, # Don't add newlines to wrapped text.
)
return rendered
def _render_log():
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config['types']
fragments, fragment_filenames = find_fragments(
pathlib.Path(config['directory']).absolute(),
config['sections'],
None,
definitions,
)
rendered = render_fragments(
pathlib.Path(config['template']).read_text(encoding='utf-8'),
config['issue_format'],
split_fragments(fragments, definitions),
definitions,
config['underlines'][1:],
)
return rendered
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config["types"]
fragments, fragment_filenames = find_fragments(
pathlib.Path(config["directory"]).absolute(),
config["sections"],
None,
definitions,
)
project_options = {
"name": config["package"],
"version": _read_text_version(),
"date": datetime.date.today().isoformat(),
}
rendered = render_fragments(
pathlib.Path(config["template"]).read_text(encoding="utf-8"),
config["issue_format"],
split_fragments(fragments, definitions),
definitions,
config["underlines"][1:],
False, # Don't add newlines to wrapped text.
project_options,
)
return rendered
def _render_log():
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config["types"]
fragments, fragment_filenames = find_fragments(
pathlib.Path(config["directory"]).absolute(),
config["sections"],
None,
definitions,
)
rendered = render_fragments(
pathlib.Path(config["template"]).read_text(encoding="utf-8"),
config["issue_format"],
split_fragments(fragments, definitions),
definitions,
config["underlines"][1:],
False, # Don't add newlines to wrapped text.
)
return rendered
def _render_log():
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config['types']
fragments, fragment_filenames = find_fragments(
pathlib.Path(config['directory']).absolute(),
config['sections'],
None,
definitions,
)
rendered = render_fragments(
pathlib.Path(config['template']).read_text(encoding='utf-8'),
config['issue_format'],
split_fragments(fragments, definitions),
definitions,
config['underlines'][1:],
)
return rendered
def _render_log():
"""Totally tap into Towncrier internals to get an in-memory result.
"""
config = load_config(ROOT)
definitions = config["types"]
fragments, fragment_filenames = find_fragments(
pathlib.Path(config["directory"]).absolute(),
config["sections"],
None,
definitions,
)
rendered = render_fragments(
pathlib.Path(config["template"]).read_text(encoding="utf-8"),
config["issue_format"],
split_fragments(fragments, definitions),
definitions,
config["underlines"][1:],
False, # Don't add newlines to wrapped text.
)
return rendered
definitions = config["types"]
fragments, fragment_filenames = find_fragments(
pathlib.Path(config["directory"]).absolute(),
config["sections"],
None,
definitions,
)
project_options = {
"name": config["package"],
"version": _read_text_version(),
"date": datetime.date.today().isoformat(),
}
rendered = render_fragments(
pathlib.Path(config["template"]).read_text(encoding="utf-8"),
config["issue_format"],
split_fragments(fragments, definitions),
definitions,
config["underlines"][1:],
False, # Don't add newlines to wrapped text.
project_options,
)
return rendered