From e73562c6f14d1d71a9fea174d58465e1b13f68af Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Tue, 9 Mar 2021 09:02:50 +0100 Subject: remove python 2 specific code add future deprecation warning to old style functions --- scalarint.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'scalarint.py') diff --git a/scalarint.py b/scalarint.py index 581a8df..3923206 100644 --- a/scalarint.py +++ b/scalarint.py @@ -1,8 +1,5 @@ # coding: utf-8 -from __future__ import print_function, absolute_import, division, unicode_literals - -from .compat import no_limit_int # NOQA from ruamel.yaml.anchor import Anchor if False: # MYPY @@ -11,13 +8,13 @@ if False: # MYPY __all__ = ['ScalarInt', 'BinaryInt', 'OctalInt', 'HexInt', 'HexCapsInt', 'DecimalInt'] -class ScalarInt(no_limit_int): +class ScalarInt(int): def __new__(cls, *args, **kw): # type: (Any, Any, Any) -> Any width = kw.pop('width', None) # type: ignore underscore = kw.pop('underscore', None) # type: ignore anchor = kw.pop('anchor', None) # type: ignore - v = no_limit_int.__new__(cls, *args, **kw) # type: ignore + v = int.__new__(cls, *args, **kw) # type: ignore v._width = width v._underscore = underscore if anchor is not None: -- cgit v1.2.1