Skip to content

Commit 8755de0

Browse files
authored
apply PEP-8 only for UUID6, UUID7 and UUID8
Opportunity to make new code more PEP-8.
1 parent e9ddb74 commit 8755de0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/uuid.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ def uuid5(namespace, name):
775775
int_uuid_5 |= _RFC_4122_VERSION_5_FLAGS
776776
return UUID._from_int(int_uuid_5)
777777

778+
778779
_last_timestamp_v6 = None
779780

780781
def uuid6(node=None, clock_seq=None):
@@ -813,6 +814,7 @@ def uuid6(node=None, clock_seq=None):
813814
int_uuid_6 |= _RFC_4122_VERSION_6_FLAGS
814815
return UUID._from_int(int_uuid_6)
815816

817+
816818
_last_timestamp_v7 = None
817819
_last_counter_v7 = 0 # 42-bit counter
818820

@@ -824,6 +826,7 @@ def _uuid7_get_counter_and_tail():
824826
tail = rand & 0xffff_ffff
825827
return counter, tail
826828

829+
827830
def uuid7():
828831
"""Generate a UUID from a Unix timestamp in milliseconds and random bits.
829832
@@ -887,6 +890,7 @@ def uuid7():
887890
_last_counter_v7 = counter
888891
return res
889892

893+
890894
def uuid8(a=None, b=None, c=None):
891895
"""Generate a UUID from three custom blocks.
892896
@@ -912,6 +916,7 @@ def uuid8(a=None, b=None, c=None):
912916
int_uuid_8 |= _RFC_4122_VERSION_8_FLAGS
913917
return UUID._from_int(int_uuid_8)
914918

919+
915920
def main():
916921
"""Run the uuid command line interface."""
917922
uuid_funcs = {

0 commit comments

Comments
 (0)