From 5920e332d2471acdbe5a071e10b757fe4815012e Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Mon, 7 Oct 2024 14:54:34 -0700 Subject: [PATCH] correct spelling of natural --- octodns/provider/yaml.py | 4 ++-- octodns/yaml.py | 4 ++-- tests/test_octodns_yaml.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/octodns/provider/yaml.py b/octodns/provider/yaml.py index 57f2745..614638a 100644 --- a/octodns/provider/yaml.py +++ b/octodns/provider/yaml.py @@ -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, diff --git a/octodns/yaml.py b/octodns/yaml.py index 8040849..0368e63 100644 --- a/octodns/yaml.py +++ b/octodns/yaml.py @@ -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: diff --git a/tests/test_octodns_yaml.py b/tests/test_octodns_yaml.py index 7015716..01718c7 100644 --- a/tests/test_octodns_yaml.py +++ b/tests/test_octodns_yaml.py @@ -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( '''