diff options
author | Anthon van der Neut <anthon@mnt.org> | 2017-08-09 16:48:27 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2017-08-09 16:48:27 +0200 |
commit | 1c728e7d84c177f1c97940b2cf4927f0fa7455c5 (patch) | |
tree | e8359e39ecab815ef73496acba867ff208495964 /scalarfloat.py | |
parent | 291b2e6757d22061acb8ee9a581dc04e3a791847 (diff) | |
download | ruamel.yaml-1c728e7d84c177f1c97940b2cf4927f0fa7455c5.tar.gz |
fix issue #25: dropping comment between mapping key and value0.15.24
Diffstat (limited to 'scalarfloat.py')
-rw-r--r-- | scalarfloat.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scalarfloat.py b/scalarfloat.py index 4608094..7f7d26d 100644 --- a/scalarfloat.py +++ b/scalarfloat.py @@ -2,14 +2,14 @@ from __future__ import print_function, absolute_import, division, unicode_literals +import sys +from .compat import no_limit_int # NOQA + if False: # MYPY from typing import Text, Any, Dict, List # NOQA __all__ = ["ScalarFloat", "ExponentialFloat", "ExponentialCapsFloat"] -import sys -from .compat import no_limit_int # NOQA - class ScalarFloat(float): def __new__(cls, *args, **kw): @@ -74,11 +74,13 @@ class ScalarFloat(float): self, self._width, self._prec, self._m_sign, self._m_lead0, # type: ignore self._exp, self._e_width, self._e_sign), file=out) # type: ignore + class ExponentialFloat(ScalarFloat): def __new__(cls, value, width=None, underscore=None): # type: (Any, Any, Any) -> Any return ScalarFloat.__new__(cls, value, width=width, underscore=underscore) + class ExponentialCapsFloat(ScalarFloat): def __new__(cls, value, width=None, underscore=None): # type: (Any, Any, Any) -> Any |