style: enforce consistent codestyle via ruff config and auto-fixes
- Configure ruff: isort, pyupgrade, bugbear, flake8 rules - Auto-fix import sorting, redundant parens, exception chaining - Remove from __future__ import annotations (Python 3.13+) - Convert debug print() to logger calls - Fix typo applicaiton → application in icon_resolver - Remove bare returns in animator setters - Move TYPE_CHECKING imports to runtime where used at runtime
This commit is contained in:
60 files changed
+243
-217
No files matched your search
@@ -219,11 +219,7 @@ class ScreenCaptureWindow(Window):
|
||||
screen_capture_service.record(
|
||||
"active", use_audio=use_audio, show_cursor=show_cursor
|
||||
)
|
||||
elif tool == "record-window":
|
||||
screen_capture_service.record(
|
||||
"selection", use_audio=use_audio, show_cursor=show_cursor
|
||||
)
|
||||
elif tool == "record-region":
|
||||
elif tool == "record-window" or tool == "record-region":
|
||||
screen_capture_service.record(
|
||||
"selection", use_audio=use_audio, show_cursor=show_cursor
|
||||
)
|
||||
@@ -289,7 +285,7 @@ class ScreenCaptureWindow(Window):
|
||||
)
|
||||
ctx.remove_class("recording")
|
||||
|
||||
def toggle(self, ss: str = None, sr: str = None):
|
||||
def toggle(self, ss: str | None = None, sr: str | None = None):
|
||||
"""
|
||||
Toggle the window, or trigger a direct action via CLI.
|
||||
:param ss: screenshot mode (e.g. 'region', 'fullscreen', 'selectwindow')
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from fabric.utils import Gdk, Gtk
|
||||
|
||||
from shared.widgets.smooth_switch import SmoothSwitch
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from fabric.widgets.button import Button
|
||||
|
||||
from utils.utils import svg_file
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user