mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-01-10 11:18:04 -05:00
Do not wrap long lines in config.yaml files (#4379)
Spec configs follow a YAML subset that does not involve linebreaks, to avoid requiring client implementations to include a full YAML lib. When Ruamel YAML was updated recently, the default settings changed and certain tests started to emit `config.yaml` with linebreaks. By setting Ruamel config `width` to a larger value, previous behaviour is restored.
This commit is contained in:
@@ -30,6 +30,7 @@ def get_cfg_yaml():
|
||||
# Spec config is using a YAML subset
|
||||
cfg_yaml = YAML(pure=True)
|
||||
cfg_yaml.default_flow_style = False # Emit separate line for each key
|
||||
cfg_yaml.width = 1024 # Do not wrap long lines
|
||||
|
||||
def cfg_represent_bytes(self, data):
|
||||
return self.represent_int(encode_hex(data))
|
||||
|
||||
Reference in New Issue
Block a user