read in FormattingConfig correctly
This commit is contained in:
parent
8a6bfef421
commit
e84030978c
1 changed files with 16 additions and 12 deletions
|
@ -53,6 +53,7 @@ class FormattingConfig(Config):
|
||||||
header = filled_content[YAML_HEADER]
|
header = filled_content[YAML_HEADER]
|
||||||
extra = header[YAML_EXTRA]
|
extra = header[YAML_EXTRA]
|
||||||
self._include_extra_header = extra[YAML_INCLUDE_EXTRA_HEADER]
|
self._include_extra_header = extra[YAML_INCLUDE_EXTRA_HEADER]
|
||||||
|
if extra[YAML_PATH] or extra[YAML_TEXT]:
|
||||||
self._extra_header = GenericText(
|
self._extra_header = GenericText(
|
||||||
extra[YAML_PATH] if extra[YAML_PATH] else extra[YAML_TEXT]
|
extra[YAML_PATH] if extra[YAML_PATH] else extra[YAML_TEXT]
|
||||||
)
|
)
|
||||||
|
@ -60,6 +61,7 @@ class FormattingConfig(Config):
|
||||||
repo = header[YAML_REPO]
|
repo = header[YAML_REPO]
|
||||||
self._include_repo_info_text = repo[YAML_INCLUDE_INFO_TEXT]
|
self._include_repo_info_text = repo[YAML_INCLUDE_INFO_TEXT]
|
||||||
self._include_repo_version = repo[YAML_INCLUDE_VERSION]
|
self._include_repo_version = repo[YAML_INCLUDE_VERSION]
|
||||||
|
if repo[YAML_PATH] or repo[YAML_TEXT]:
|
||||||
self._repo_info_text = GenericText(
|
self._repo_info_text = GenericText(
|
||||||
repo[YAML_PATH] if repo[YAML_PATH] else repo[YAML_TEXT]
|
repo[YAML_PATH] if repo[YAML_PATH] else repo[YAML_TEXT]
|
||||||
)
|
)
|
||||||
|
@ -67,6 +69,7 @@ class FormattingConfig(Config):
|
||||||
pytex = header[YAML_PYTEX]
|
pytex = header[YAML_PYTEX]
|
||||||
self._include_pytex_info_text = pytex[YAML_INCLUDE_INFO_TEXT]
|
self._include_pytex_info_text = pytex[YAML_INCLUDE_INFO_TEXT]
|
||||||
self._include_pytex_version = pytex[YAML_INCLUDE_VERSION]
|
self._include_pytex_version = pytex[YAML_INCLUDE_VERSION]
|
||||||
|
if pytex[YAML_PATH] or pytex[YAML_TEXT]:
|
||||||
self._pytex_info_text = GenericText(
|
self._pytex_info_text = GenericText(
|
||||||
pytex[YAML_PATH] if pytex[YAML_PATH] else pytex[YAML_TEXT]
|
pytex[YAML_PATH] if pytex[YAML_PATH] else pytex[YAML_TEXT]
|
||||||
)
|
)
|
||||||
|
@ -75,6 +78,7 @@ class FormattingConfig(Config):
|
||||||
|
|
||||||
license_ = header[YAML_LICENSE]
|
license_ = header[YAML_LICENSE]
|
||||||
self._include_license = license_[YAML_INCLUDE_LICENSE]
|
self._include_license = license_[YAML_INCLUDE_LICENSE]
|
||||||
|
if license_[YAML_PATH] or license_[YAML_TEXT]:
|
||||||
self._license = GenericText(
|
self._license = GenericText(
|
||||||
license_[YAML_PATH] if license_[YAML_PATH] else license_[YAML_TEXT]
|
license_[YAML_PATH] if license_[YAML_PATH] else license_[YAML_TEXT]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue