Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aniezurawski committed May 8, 2023
1 parent 6178d6a commit 79bc17a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/neptune/attributes/atoms/integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@
#
__all__ = ["Integer"]

import logging
import typing

from neptune.attributes.atoms.copiable_atom import CopiableAtom
from neptune.internal.container_type import ContainerType
from neptune.internal.operation import AssignInt
from neptune.internal.utils.logger import logger
from neptune.types.atoms.integer import Integer as IntegerVal

if typing.TYPE_CHECKING:
from neptune.internal.backends.neptune_backend import NeptuneBackend


_logger = logging.getLogger(__name__)


class Integer(CopiableAtom):

MAX_32_BIT_INT = 2147483647
Expand All @@ -53,8 +50,8 @@ def assign(self, value: typing.Union[IntegerVal, float, int], *, wait: bool = Fa
if not isinstance(value, IntegerVal):
value = IntegerVal(value)

if value.value > Integer.MAX_32_BIT_INT or value.value < Integer.MIN_32_BIT_INT:
_logger.warning(
if Integer.MIN_32_BIT_INT < value.value < Integer.MAX_32_BIT_INT:
logger.warning(
"WARNING: The value you're trying to log is outside the range of 32-bit integers "
"(%s to %s) and will be skipped. "
"We'll support 64-bit integers in the future. "
Expand Down

0 comments on commit 79bc17a

Please sign in to comment.