From c241a64d1bdefd543d3826d43bc26544ef589cc3 Mon Sep 17 00:00:00 2001 From: John Clary Date: Mon, 11 Apr 2022 16:25:46 -0500 Subject: [PATCH 1/2] stop shadowing 'key' in Record.format --- knackpy/record.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/knackpy/record.py b/knackpy/record.py index 6cf4fe6..d040a7e 100644 --- a/knackpy/record.py +++ b/knackpy/record.py @@ -166,16 +166,16 @@ def format(self, keys: Union[list, bool] = True, values: Union[list, bool] = Tru """ record = {} - for key, field in self.fields.items(): + for field_key, field in self.fields.items(): try: # try to see if key is contained by list keys - key = field.name if key in keys else key + key = field.name if field_key in keys else field_key except TypeError: # assume keys is a bool - key = field.name if keys else key + key = field.name if keys else field_key try: # try to see if value is contained by list values - value = field.formatted if key in values else field.raw + value = field.formatted if field_key in values else field.raw except TypeError: # assume values is a bool value = field.formatted if values else field.raw From dfe285612b988eefc586cc8533ea91cea393d714 Mon Sep 17 00:00:00 2001 From: John Clary Date: Mon, 11 Apr 2022 16:32:11 -0500 Subject: [PATCH 2/2] bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a2aab85..dd97d9b 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def build_config(env, readme="README.md"): "packages": ["knackpy"], "tests_require": ["pytest", "coverage"], "url": "http://github.com/cityofaustin/knackpy", - "version": "1.0.20", + "version": "1.0.21", }