Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed May 9, 2022
1 parent 6781432 commit 32f8013
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions exchangelib/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@ def __new__(mcs, name, bases, kwargs):
# Folder class, making the custom field available for subclasses).
if local_fields:
kwargs["FIELDS"] = fields
cls = super().__new__(mcs, name, bases, kwargs)
cls._slots_keys = mcs._get_slots_keys(cls)
return cls
klass = super().__new__(mcs, name, bases, kwargs)
klass._slots_keys = mcs._get_slots_keys(klass)
return klass

@staticmethod
def _get_slots_keys(cls):
def _get_slots_keys(klass):
seen = set()
keys = []
for c in reversed(getmro(cls)):
for c in reversed(getmro(klass)):
if not hasattr(c, "__slots__"):
continue
for k in c.__slots__:
Expand Down Expand Up @@ -1920,7 +1920,7 @@ def _get_standard_period(self, transitions_group):
return standard_periods_map[transition.to]
except KeyError:
continue
raise ValueError(f"No standard period matching transition reference {transition.to}")
raise ValueError(f"No standard period matching any transition in {transitions_group}")

def _get_transitions_group(self, for_year):
# Look through the transitions, and pick the relevant transition group according to the 'for_year' value
Expand Down

0 comments on commit 32f8013

Please sign in to comment.