Skip to content

Commit

Permalink
Add pylint issues with refactoring and explicit disables.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahawker committed Jun 26, 2017
1 parent 0f0e534 commit 9597488
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ulid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
:license: Apache 2.0, see LICENSE for more details.
"""
from . import api
from .api import *
from .api import * # pylint: disable=wildcard-import
from . import ulid
from .ulid import *
from .ulid import * # pylint: disable=wildcard-import


__all__ = api.__all__ + ulid.__all__
Expand Down
4 changes: 2 additions & 2 deletions ulid/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

#: Type hint that defines multiple primitive types that can represent
#: a Unix timestamp in seconds.
TimestampPrimitive = typing.Union[int, float, str, bytes, bytearray, memoryview,
TimestampPrimitive = typing.Union[int, float, str, bytes, bytearray, memoryview, # pylint: disable=invalid-name
datetime.datetime, ulid.Timestamp, ulid.ULID]


#: Type hint that defines multiple primitive types that can represent
#: randomness.
RandomnessPrimitive = typing.Union[int, float, str, bytes, bytearray, memoryview,
RandomnessPrimitive = typing.Union[int, float, str, bytes, bytearray, memoryview, # pylint: disable=invalid-name
ulid.Randomness, ulid.ULID]


Expand Down
2 changes: 1 addition & 1 deletion ulid/hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

#: Type hint that defines multiple types that implement the buffer protocol
#: that can encoded into a Base32 string.
Buffer = typing.Union[bytes, bytearray, memoryview]
Buffer = typing.Union[bytes, bytearray, memoryview] # pylint: disable=invalid-name
4 changes: 2 additions & 2 deletions ulid/ulid.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def datetime(self) -> datetime.datetime:
:return: Timestamp in datetime form.
:rtype: :class:`~datetime.datetime`
"""
ms = self.int
return datetime.datetime.utcfromtimestamp(ms // 1000.0).replace(microsecond=ms % 1000 * 1000)
mills = self.int
return datetime.datetime.utcfromtimestamp(mills // 1000.0).replace(microsecond=mills % 1000 * 1000)


class Randomness(MemoryView):
Expand Down

0 comments on commit 9597488

Please sign in to comment.