diff options
author | Anthon van der Neut <anthon@mnt.org> | 2021-03-09 09:02:50 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2021-03-09 09:02:50 +0100 |
commit | e73562c6f14d1d71a9fea174d58465e1b13f68af (patch) | |
tree | 309851cca7d411b31c27753555871d493282c7f0 /scalarint.py | |
parent | 96839d9f64f4698bdc519cbfbd48d51178460714 (diff) | |
download | ruamel.yaml-e73562c6f14d1d71a9fea174d58465e1b13f68af.tar.gz |
remove python 2 specific code
add future deprecation warning to old style functions
Diffstat (limited to 'scalarint.py')
-rw-r--r-- | scalarint.py | 7 |
1 files changed, 2 insertions, 5 deletions
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: |