]> granicus.if.org Git - graphviz/commitdiff
remove unnecessary parens on Python classes
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Jul 2021 02:42:14 +0000 (19:42 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 9 Jul 2021 04:46:52 +0000 (21:46 -0700)
New-style Python 3 classes do not need parens if they are not inheriting from
any other class.

rtest/generate_graph.py

index a4c74defc0fdf7fd31d6f64afcc63370b4f0776b..32f228cb9d34aa7dd52eff434741995dcc7e7901 100755 (executable)
@@ -38,7 +38,7 @@ import sys
 import tempfile
 from typing import List, Optional
 
-class Graph():
+class Graph:
   """generative representation of a large graph"""
 
   def __init__(self, directed: bool, branching: int):
@@ -85,7 +85,7 @@ class Graph():
         out.write(f'  n{src} {"->" if self.directed else "--"} n{dst}\n')
     out.write("}")
 
-class Result():
+class Result:
   TIMEOUT = 124
 
   def __init__(self, status: int, runtime: int, rss: Optional[int] = 0):