Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
Fix #32: Use "augmented assignment statements" (+=/-=) instead of ass…
Browse files Browse the repository at this point in the history
…ignment statements
  • Loading branch information
nlpsuge committed Aug 7, 2022
1 parent e6bf5a9 commit 573c0c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xsession_manager/arguments_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def handle_arguments(self):
try:
file_path = Path(constants.Locations.BASE_LOCATION_OF_SESSIONS, file)
with open(file_path, 'r') as f:
num = num + 1
num += 1
namespace_objs: XSessionConfig = json.load(f, object_hook=lambda d: Namespace(**d))
print(str(num) +'. ' + namespace_objs.session_name,
namespace_objs.session_create_time,
Expand Down Expand Up @@ -201,7 +201,7 @@ def handle_arguments(self):
# Print data according to declared order
ordered_variables = vars(XSessionConfigObject)['__annotations__']
for x_session_config_object in x_session_config_objects:
count = count + 1
count += 1
print('%d.' % count)

# Get fields in declared order
Expand Down
4 changes: 2 additions & 2 deletions xsession_manager/xsession_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _move_windows_while_restore(self, session_name, x_session_config_objects_cop
while Gtk.events_pending():
Gtk.main_iteration()

retry_count_down = retry_count_down - 1
retry_count_down -= 1

self._suppress_log_if_already_in_workspace = True
self.move_window(session_name)
Expand Down Expand Up @@ -281,7 +281,7 @@ def _restore_sessions(self,
running_restores.append(index)
is_running = True
with self.instance_lock:
self.restore_app_countdown = self.restore_app_countdown - 1
self.restore_app_countdown -= 1
break
if is_running:
continue
Expand Down

0 comments on commit 573c0c4

Please sign in to comment.