Skip to content

Commit e43c69d

Browse files
committed
doc: Update docstrings with pydocstyle fixes
1 parent 95b7efb commit e43c69d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bids_validator/context_generator.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def get_schema(url: str | None = None) -> Dict[str, Any]:
3737
-------
3838
Dict[str, Any]
3939
The loaded schema as a dictionary.
40+
4041
"""
4142
if url is None:
4243
return bst.schema.load_schema()
@@ -69,6 +70,7 @@ def create_attrs_class(
6970
-------
7071
cls : type
7172
The dynamically created attrs class.
73+
7274
"""
7375
attributes = {}
7476
for prop_name, prop_info in properties.items():
@@ -133,6 +135,7 @@ def generate_attrs_classes_from_schema(
133135
-------
134136
cls : type
135137
The root class created from the schema.
138+
136139
"""
137140
if 'properties' not in schema:
138141
raise ValueError("Invalid schema: 'properties' field is required")
@@ -145,14 +148,15 @@ def generate_attrs_classes_from_schema(
145148

146149

147150
def populate_namespace(attrs_class: type, namespace: Dict[str, Any]) -> None:
148-
"""Populate a namespace with nested attrs classes
151+
"""Populate a namespace with nested attrs classes.
149152
150153
Parameters
151154
----------
152155
attrs_class : type
153156
The root attrs class to add to the namespace.
154157
namespace : Dict[str, Any]
155158
The namespace to populate with nested classes.
159+
156160
"""
157161
for attr in attrs_class.__attrs_attrs__:
158162
attr_type = attr.type
@@ -179,6 +183,7 @@ def load_schema_into_namespace(
179183
The namespace to load the schema into.
180184
root_class_name : str
181185
The name of the root class to create.
186+
182187
"""
183188
attrs_class = generate_attrs_classes_from_schema(schema, root_class_name)
184189
namespace[root_class_name] = attrs_class

0 commit comments

Comments
 (0)