mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 13:36:14 +02:00
Replace PyYAML with ruamel.yaml (#1416)
* Remove Python 3.7 and 3.8 from github actions workflows * Update lockfile after running poetry update a couple times * Update poetry lock * Remove Python 3.7 and 3.8 from pyproject.toml and run poetry lock * Switch from pyyaml to ruamel.yaml * Remove duplicate editor key in config * Use ruamel.yaml instead of pyyaml in legacy template.py * Prevent ruamel from collapsing config YAML * Run make format
This commit is contained in:
parent
e46b5a171f
commit
d3de5b778b
6 changed files with 154 additions and 129 deletions
|
@ -8,7 +8,7 @@ from xml.etree import ElementTree
|
|||
|
||||
from pytest_bdd import then
|
||||
from pytest_bdd.parsers import parse
|
||||
import yaml
|
||||
from ruamel.yaml import YAML
|
||||
|
||||
from jrnl.config import scope_config
|
||||
|
||||
|
@ -121,7 +121,7 @@ def config_var_on_disk(config_on_disk, journal_name, should_or_should_not, some_
|
|||
if journal_name:
|
||||
actual = actual["journals"][journal_name]
|
||||
|
||||
expected = yaml.load(some_yaml, Loader=yaml.SafeLoader)
|
||||
expected = YAML(typ="safe").load(some_yaml)
|
||||
|
||||
actual_slice = actual
|
||||
if type(actual) is dict:
|
||||
|
@ -152,7 +152,7 @@ def config_var_in_memory(
|
|||
if journal_name:
|
||||
actual = actual["journals"][journal_name]
|
||||
|
||||
expected = yaml.load(some_yaml, Loader=yaml.SafeLoader)
|
||||
expected = YAML(typ="safe").load(some_yaml)
|
||||
|
||||
actual_slice = actual
|
||||
if type(actual) is dict:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue