Skip to content

Commit

Permalink
silence some minor linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 16, 2025
1 parent 93f5670 commit ce31068
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion xpra/client/pyglet/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def draw(self, x, y, w, h, coding, data, stride) -> None:
image = ImageData(w, h, "RGBA", data, pitch=stride or w*4)
else:
raise ValueError(f"invalid encoding {coding!r}")
bw, bh = self.get_size()
bh = self.get_size()[1]
self.sprite = Sprite(image, x=x, y=bh - y - h)
self.sprite.draw()
self.flip()
5 changes: 2 additions & 3 deletions xpra/x11/vfb_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ def patch_xvfb_command(xvfb_cmd: list[str], w: int, h: int, pixel_depth: int) ->
no_arg = xvfb_cmd.index("0")
except ValueError:
no_arg = -1
if no_arg > 0:
if no_arg == screen_arg + 1:
xvfb_cmd.pop(no_arg)
if no_arg > 0 and no_arg == screen_arg + 1:
xvfb_cmd.pop(no_arg)
# remove the "-screen" argument and the geometry that follows:
xvfb_cmd.pop(screen_arg)
xvfb_cmd.pop(screen_arg)
Expand Down
2 changes: 1 addition & 1 deletion xpra/x11/wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main(args) -> ExitValue:
try:
wait_for_x_server(display)
return ExitCode.OK
except SystemExit as e:
except SystemExit as e: # NOSONAR @SuppressWarnings("python:S5727")
return e.code
except RuntimeError as e:
sys.stderr.write(f"{e}\n")
Expand Down

0 comments on commit ce31068

Please sign in to comment.