Skip to content

Commit 85c6a4a

Browse files
committed
Changed attribute names - plural !
1 parent 5467ca1 commit 85c6a4a

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/cryptojwt/key_bundle.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def difference(self, bundle):
752752

753753
return [k for k in self._keys if k not in bundle]
754754

755-
def dump(self, exclude_attribute: Optional[List[str]] = None):
755+
def dump(self, exclude_attributes: Optional[List[str]] = None):
756756
_keys = []
757757
for _k in self._keys:
758758
_ser = _k.to_dict()
@@ -783,8 +783,8 @@ def dump(self, exclude_attribute: Optional[List[str]] = None):
783783
if self.source:
784784
res["source"] = self.source
785785

786-
if exclude_attribute:
787-
for attr in exclude_attribute:
786+
if exclude_attributes:
787+
for attr in exclude_attributes:
788788
del res[attr]
789789

790790
return res

src/cryptojwt/key_issuer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,17 +352,17 @@ def __len__(self):
352352
nr += len(kb)
353353
return nr
354354

355-
def dump(self, exclude_attribute: Optional[List[str]] = None) -> dict:
355+
def dump(self, exclude_attributes: Optional[List[str]] = None) -> dict:
356356
"""
357357
Returns the content as a dictionary.
358358
359-
:param exclude_attribute: List of attribute names for objects that should be ignored.
359+
:param exclude_attributes: List of attribute names for objects that should be ignored.
360360
:return: A dictionary
361361
"""
362362

363363
_bundles = []
364364
for kb in self._bundles:
365-
_bundles.append(kb.dump(exclude_attribute=exclude_attribute))
365+
_bundles.append(kb.dump(exclude_attributes=exclude_attributes))
366366

367367
info = {
368368
"name": self.name,
@@ -375,8 +375,8 @@ def dump(self, exclude_attribute: Optional[List[str]] = None) -> dict:
375375
}
376376

377377
# remove after the fact
378-
if exclude_attribute:
379-
for attr in exclude_attribute:
378+
if exclude_attributes:
379+
for attr in exclude_attributes:
380380
del info[attr]
381381

382382
return info

src/cryptojwt/key_jar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -629,14 +629,14 @@ def __len__(self):
629629
def dump(
630630
self,
631631
exclude_issuer: Optional[List[str]] = None,
632-
exclude_attribute: Optional[List[str]] = None,
632+
exclude_attributes: Optional[List[str]] = None,
633633
) -> dict:
634634
"""
635635
Returns the key jar content as dictionary
636636
637-
:param exclude_issuer: A list of issuers you don't want included.
638-
:param exclude_attribute: list of attribute names that should be ignored when dumping.
639-
:type exclude_attribute: list
637+
:param exclude_issuers: A list of issuers you don't want included.
638+
:param exclude_attributes: list of attribute names that should be ignored when dumping.
639+
:type exclude_attributes: list
640640
:return: A dictionary
641641
"""
642642

@@ -652,7 +652,7 @@ def dump(
652652
for _id, _issuer in self._issuers.items():
653653
if exclude_issuer and _issuer.name in exclude_issuer:
654654
continue
655-
_issuers[_id] = _issuer.dump(exclude_attribute=exclude_attribute)
655+
_issuers[_id] = _issuer.dump(exclude_attributes=exclude_attributes)
656656
info["issuers"] = _issuers
657657

658658
return info

0 commit comments

Comments
 (0)