File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ def __int__(self):
323323 return self .int
324324
325325 def __repr__ (self ):
326- return '%s(%r)' % ( self .__class__ .__name__ , str (self ))
326+ return f' { self .__class__ .__name__ } ( { str (self )!r } )'
327327
328328 def __setattr__ (self , name , value ):
329329 raise TypeError ('UUID objects are immutable' )
@@ -611,7 +611,7 @@ def _arp_getnode():
611611 return mac
612612
613613 # This works on Linux, FreeBSD and NetBSD
614- mac = _find_mac_near_keyword ('arp' , '-an' , [os .fsencode ('(%s)' % ip_addr )],
614+ mac = _find_mac_near_keyword ('arp' , '-an' , [os .fsencode (f'( { ip_addr } )' )],
615615 lambda i : i + 2 )
616616 # Return None instead of 0.
617617 if mac :
@@ -718,7 +718,7 @@ def getnode():
718718 continue
719719 if (_node is not None ) and (0 <= _node < (1 << 48 )):
720720 return _node
721- assert False , '_random_getnode() returned invalid value: {}' . format ( _node )
721+ assert False , f '_random_getnode() returned invalid value: { _node } '
722722
723723
724724_last_timestamp = None
You can’t perform that action at this time.
0 commit comments