Skip to content

Commit 953e550

Browse files
committed
sty: Address ruff complaints
1 parent 6bea989 commit 953e550

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tools/schemacode/src/bidsschematools/render/tables.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,7 @@ def make_entity_table(schema, tablefmt="github", src_path=None, **kwargs):
298298
formats = ["Format"]
299299
table = [formats]
300300

301-
suffix_map = {
302-
obj.value: key for key, obj in schema.objects.suffixes.items()
303-
}
301+
suffix_map = {obj.value: key for key, obj in schema.objects.suffixes.items()}
304302

305303
# Compose header and formats first
306304
for long_name in schema.rules.entities:
@@ -325,7 +323,8 @@ def make_entity_table(schema, tablefmt="github", src_path=None, **kwargs):
325323

326324
for (dtype, entities), suffixes in rows.items():
327325
suf_str = " ".join(
328-
f"[{suffix}]({GLOSSARY_PATH}.md#objects.suffixes.{suffix_map[suffix]})" for suffix in suffixes
326+
f"[{suffix}]({GLOSSARY_PATH}.md#objects.suffixes.{suffix_map[suffix]})"
327+
for suffix in suffixes
329328
)
330329
# TODO: <br> is specific for html form
331330
fmt_str = f"[{dtype}]({GLOSSARY_PATH}.md#objects.datatypes.{dtype})<br>({suf_str})"

tools/schemacode/src/bidsschematools/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import os
77
import sys
88
import warnings
9-
from contextlib import contextmanager
109
from functools import wraps
1110

1211
from . import data
@@ -184,6 +183,7 @@ class WarningsFilter:
184183
185184
Arguments are lists of positional arguments to :func:`warnings.filterwarnings`.
186185
"""
186+
187187
def __init__(self, *filters):
188188
self.filters = filters
189189

0 commit comments

Comments
 (0)