Skip to content

Commit 12e23ad

Browse files
committed
style: ran pre-commit workflows on module
Signed-off-by: Kin Long Kelvin Lee <kin.long.kelvin.lee@intel.com>
1 parent da79575 commit 12e23ad

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

codebasin/util.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
- Checking paths
88
"""
99

10-
from io import TextIOWrapper
1110
import json
1211
import logging
1312
import os
1413
import pkgutil
1514
import tomllib
1615
import typing
1716
from collections.abc import Iterable
17+
from io import TextIOWrapper
1818
from pathlib import Path
1919

2020
import jsonschema
@@ -69,7 +69,7 @@ def valid_path(path: os.PathLike[str]) -> bool:
6969
"""
7070
Check if a given file path is valid.
7171
72-
This function ensures that the file path does not contain
72+
This function ensures that the file path does not contain
7373
potentially dangerous characters such as null bytes (`\x00`)
7474
or carriage returns/line feeds (`\n`, `\r`). These characters
7575
can pose security risks, particularly in file handling operations.
@@ -82,12 +82,12 @@ def valid_path(path: os.PathLike[str]) -> bool:
8282
Returns
8383
-------
8484
bool
85-
A boolean value indicating whether the path is valid
85+
A boolean value indicating whether the path is valid
8686
(`True`) or invalid (`False`).
8787
8888
Notes
8989
-----
90-
- This function is useful for validating file paths before performing
90+
- This function is useful for validating file paths before performing
9191
file I/O operations to prevent security vulnerabilities.
9292
9393
Examples
@@ -229,7 +229,10 @@ def _load_json(file_object: typing.TextIO, schema_name: str) -> object:
229229
return json_object
230230

231231

232-
def _load_toml(file_object: typing.TextIO, schema_name: str) -> dict[str, typing.Any]:
232+
def _load_toml(
233+
file_object: typing.TextIO,
234+
schema_name: str,
235+
) -> dict[str, typing.Any]:
233236
"""
234237
Load TOML from file and validate it against a schema.
235238

0 commit comments

Comments
 (0)