diff --git a/arrow/arrow.py b/arrow/arrow.py index cefebb3e4..954436fd2 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -828,8 +828,8 @@ def for_json(self): # internal tools. - @classmethod - def _get_tzinfo(cls, tz_expr): + @staticmethod + def _get_tzinfo(tz_expr): if tz_expr is None: return dateutil_tz.tzutc() @@ -882,8 +882,8 @@ def _get_iteration_params(cls, end, limit): else: return end, sys.maxsize - @classmethod - def _get_timestamp_from_input(cls, timestamp): + @staticmethod + def _get_timestamp_from_input(timestamp): try: return float(timestamp) diff --git a/arrow/parser.py b/arrow/parser.py index 56b13b6c9..8feb79a00 100644 --- a/arrow/parser.py +++ b/arrow/parser.py @@ -205,8 +205,8 @@ def _parse_token(self, token, value, parts): ): parts['am_pm'] = 'pm' - @classmethod - def _build_datetime(cls, parts): + @staticmethod + def _build_datetime(parts): timestamp = parts.get('timestamp') @@ -243,24 +243,24 @@ def _parse_multiformat(self, string, formats): return _datetime - @classmethod - def _map_lookup(cls, input_map, key): + @staticmethod + def _map_lookup(input_map, key): try: return input_map[key] except KeyError: raise ParserError('Could not match "{0}" to {1}'.format(key, input_map)) - @classmethod - def _try_timestamp(cls, string): + @staticmethod + def _try_timestamp(string): try: return float(string) except: return None - @classmethod - def _choice_re(cls, choices, flags=0): + @staticmethod + def _choice_re(choices, flags=0): return re.compile('({0})'.format('|'.join(choices)), flags=flags)