chore: run pyupgrade (#623)

- use `{...}` instead of `set([...])`
- do not use `class Foo(object):`, just use `class Foo:`
- do not specify default flags (`"r"`) for `open()`
This commit is contained in:
Pavol Rusnak
2024-09-24 13:53:35 +02:00
committed by GitHub
parent 870d75b205
commit 25f0763f94
16 changed files with 23 additions and 23 deletions

View File

@@ -144,7 +144,7 @@ class TorProxy:
def read_pid(self):
if not os.path.isfile(self.pid_file):
return None
with open(self.pid_file, "r") as f:
with open(self.pid_file) as f:
pid = f.readlines()
# check if pid is valid
if len(pid) == 0 or not int(pid[0]) > 0: