Skip to content

Commit 70ddd89

Browse files
pre-commit-ci[bot]whot
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 99c5d1e commit 70ddd89

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

test/test_data_files.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ def test_device_match(tabletfile):
4848
"i2c",
4949
"serial",
5050
], f"{tabletfile}: unknown bus type"
51-
assert re.match(
52-
"[0-9a-f]{4}", vid
53-
), f"{tabletfile}: {vid} must be lowercase hex"
54-
assert re.match(
55-
"[0-9a-f]{4}", pid
56-
), f"{tabletfile}: {pid} must be lowercase hex"
51+
assert re.match("[0-9a-f]{4}", vid), (
52+
f"{tabletfile}: {vid} must be lowercase hex"
53+
)
54+
assert re.match("[0-9a-f]{4}", pid), (
55+
f"{tabletfile}: {pid} must be lowercase hex"
56+
)
5757

5858

5959
def test_no_receiver_id(tabletfile):

test/test_svg.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ def has_item(self, id: str, classes: Optional[List[str]] = None):
5252
assert len(nodes) == 1, f"Expected one element with id {id}, have {len(nodes)}"
5353
node = nodes[0]
5454
for klass in classes or []:
55-
assert klass in node.get("class", "").split(
56-
" "
57-
), f"Missing class '{klass}' for {id}. Have: {node.get('class')}"
55+
assert klass in node.get("class", "").split(" "), (
56+
f"Missing class '{klass}' for {id}. Have: {node.get('class')}"
57+
)
5858

5959
@property
6060
def name(self):
@@ -125,9 +125,9 @@ def test_svg_maybe_not_needed(svgdevice):
125125
device.num_strips,
126126
device.num_dials,
127127
]
128-
assert any(
129-
x > 0 for x in features
130-
), f"Device {device.name} has no buttons/rings/strips/dials and should not have an SVG"
128+
assert any(x > 0 for x in features), (
129+
f"Device {device.name} has no buttons/rings/strips/dials and should not have an SVG"
130+
)
131131

132132

133133
def has_item(root, id: str, classes: Optional[List[str]] = None):
@@ -136,9 +136,9 @@ def has_item(root, id: str, classes: Optional[List[str]] = None):
136136
assert len(nodes) == 1, f"Expected on element with id {id}, have {len(nodes)}"
137137
node = nodes[0]
138138
for klass in classes or []:
139-
assert klass in node.get("class").split(
140-
" "
141-
), f"Missing class '{klass}' for {id}. Have: {node.get('class')}"
139+
assert klass in node.get("class").split(" "), (
140+
f"Missing class '{klass}' for {id}. Have: {node.get('class')}"
141+
)
142142

143143

144144
def test_svg_rings(ringdevice):

tools/show-stylus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def load_data_files():
154154
else:
155155
die("Unable to find a libwacom.stylus data file")
156156

157-
print(f'Using stylus file(s): {", ".join([str(s) for s in stylusfiles])}')
157+
print(f"Using stylus file(s): {', '.join([str(s) for s in stylusfiles])}")
158158

159159
styli = {}
160160

0 commit comments

Comments
 (0)