Skip to content

Commit a04527b

Browse files
committed
some linting
1 parent 4928d57 commit a04527b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ select = [
100100
# ruf
101101
"RUF",
102102
]
103-
ignore = ["ANN201", "ANN001", "ANN002", "ANN202", "ARG002", "PLR", "C", "FBT002", "D107", "ANN204", "D"]
103+
ignore = ["ANN201", "ANN001", "ANN002", "ANN202", "ARG002", "PLR", "C", "FBT002", "D107", "ANN204", "D", "ISC001"]
104104

105105
[tool.ruff.format]
106106
indent-style = "space"

src/wlr_layout_ui/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import pyglet
66

77
from .gui import UI
8+
from .profiles import load_profiles
89
from .screens import displayInfo, load
910
from .settings import LEGACY, PROG_NAME, UI_RATIO, reload_pre_commands
1011
from .utils import Rect, make_command
@@ -44,8 +45,6 @@ def apply_profile(profile):
4445

4546
def main():
4647
if len(sys.argv) > 1:
47-
from .profiles import load_profiles
48-
4948
profiles = load_profiles()
5049
if sys.argv[1] == "-l":
5150
print("")
@@ -70,7 +69,7 @@ def main():
7069
"""With no options, launches the GUI
7170
Options:
7271
-l : list profiles
73-
-m : find a profile that matches the currently plugged display set, and apply it.
72+
-m : find a profile that matches the currently plugged display set, and apply it.
7473
No-op if not found; will apply first in alphabetical order if multiple found.
7574
<profile name> : loads a profile
7675
"""
@@ -79,9 +78,9 @@ def main():
7978
reload_pre_commands()
8079
try:
8180
profile = profiles[sys.argv[1]]
82-
except KeyError:
81+
except KeyError as e:
8382
print(f"No such profile: {sys.argv[1]}")
84-
raise SystemExit(1)
83+
raise SystemExit(1) from e
8584
apply_profile(profile)
8685
return
8786
load()

0 commit comments

Comments
 (0)