Skip to content

Commit

Permalink
Adjust to ruff 0.3.0
Browse files Browse the repository at this point in the history
That doesn't like the `# fmt off` annotations:

> RUF028 This suppression comment is invalid because it cannot be in an expression, pattern, argument list, or other non-statement

So throw beauty out of the door and concede to the battling tools.
  • Loading branch information
martinpitt committed Mar 1, 2024
1 parent 47829f0 commit 0d453db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbusmock/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def parse_args():
help="template to load (instead of specifying name, path, interface)",
)
parser.add_argument(
"name", # fmt: off
"name",
metavar="NAME",
nargs="?",
help='D-Bus name to claim (e. g. "com.example.MyService") (if not using -t)',
Expand Down
8 changes: 6 additions & 2 deletions dbusmock/templates/gnome_screensaver.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ def load(mock, _parameters):
[
("GetActive", "", "b", "ret = self.is_active"),
("GetActiveTime", "", "u", "ret = 1"),
# fmt: off
("SetActive", "b", "", 'self.is_active = args[0]; self.EmitSignal("", "ActiveChanged", "b", [self.is_active])'),
(
"SetActive",
"b",
"",
'self.is_active = args[0]; self.EmitSignal("", "ActiveChanged", "b", [self.is_active])',
),
("Lock", "", "", "time.sleep(1); self.SetActive(True)"),
("ShowMessage", "sss", "", ""),
("SimulateUserActivity", "", "", ""),
Expand Down

0 comments on commit 0d453db

Please sign in to comment.