Browse Source

correct spelling of natural

pull/1207/head
Ross McFarland 1 year ago
parent
commit
5920e332d2
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
3 changed files with 5 additions and 5 deletions
  1. +2
    -2
      octodns/provider/yaml.py
  2. +2
    -2
      octodns/yaml.py
  3. +1
    -1
      tests/test_octodns_yaml.py

+ 2
- 2
octodns/provider/yaml.py View File

@ -38,7 +38,7 @@ class YamlProvider(BaseProvider):
# - simple: `sort`
# - natual: https://pypi.org/project/natsort/
# (optional, default natual)
order_mode: natrual
order_mode: natural
# Whether duplicate records should replace rather than error
# (optional, default False)
@ -179,7 +179,7 @@ class YamlProvider(BaseProvider):
directory,
default_ttl=3600,
enforce_order=True,
order_mode='natrual',
order_mode='natural',
populate_should_replace=False,
supports_root_ns=True,
split_extension=False,


+ 2
- 2
octodns/yaml.py View File

@ -83,10 +83,10 @@ SimpleSortEnforcingLoader.add_constructor(
)
def safe_load(stream, enforce_order=True, order_mode='natrual'):
def safe_load(stream, enforce_order=True, order_mode='natural'):
if enforce_order:
loader = {
'natrual': NaturalSortEnforcingLoader,
'natural': NaturalSortEnforcingLoader,
'simple': SimpleSortEnforcingLoader,
}[order_mode]
else:


+ 1
- 1
tests/test_octodns_yaml.py View File

@ -100,7 +100,7 @@ class TestYaml(TestCase):
order_mode='simple',
),
)
# natrual sort throws error
# natural sort throws error
with self.assertRaises(ConstructorError) as ctx:
safe_load(
'''


Loading…
Cancel
Save