mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 11:44:19 +01:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user