Skip to content

Commit c4e748d

Browse files
style: apply ruff format to src/schemaforge/generators/json_schema_generator.py
1 parent b33eed0 commit c4e748d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/schemaforge/generators/json_schema_generator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Converts tables/columns into a JSON Schema document
44
with each table as a ``$defs`` entry and columns as properties.
55
"""
6+
67
from __future__ import annotations
78

89
import json
@@ -125,6 +126,7 @@ def _column_to_prop(self, col: Column) -> dict[str, Any]:
125126
if overridden.startswith("{") and overridden.endswith("}"):
126127
try:
127128
import json as _json
129+
128130
prop = _json.loads(overridden)
129131
return self._add_base_annotations(prop, col)
130132
except (json.JSONDecodeError, ValueError):
@@ -157,7 +159,7 @@ def _column_to_prop(self, col: Column) -> dict[str, Any]:
157159
max_val = 10 ** (prec - (scale or 0)) - 10 ** -(scale or 0)
158160
prop["maximum"] = max_val
159161
if scale:
160-
prop["multipleOf"] = 10 ** -(scale)
162+
prop["multipleOf"] = 10**-(scale)
161163

162164
return self._add_base_annotations(prop, col)
163165

0 commit comments

Comments
 (0)