mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 02:13:15 +08:00
pyupgrade --py37-plus **/*.py (#1654)
* pyupgrade --py37-plus **/*.py * fixup! Format Python code with psf/black push
This commit is contained in:

committed by
John Law

parent
34c808b375
commit
28419cf839
@ -2,7 +2,7 @@ from random import random
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
class Node(object):
|
||||
class Node:
|
||||
"""
|
||||
Treap's node
|
||||
Treap is a binary tree by value and heap by priority
|
||||
@ -18,11 +18,10 @@ class Node(object):
|
||||
from pprint import pformat
|
||||
|
||||
if self.left is None and self.right is None:
|
||||
return "'%s: %.5s'" % (self.value, self.prior)
|
||||
return f"'{self.value}: {self.prior:.5}'"
|
||||
else:
|
||||
return pformat(
|
||||
{"%s: %.5s" % (self.value, self.prior): (self.left, self.right)},
|
||||
indent=1,
|
||||
{f"{self.value}: {self.prior:.5}": (self.left, self.right)}, indent=1,
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
Reference in New Issue
Block a user