Skip to content

Commit

Permalink
enable format checker
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Jun 17, 2024
1 parent 7ea0879 commit 8016cbd
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 3 deletions.
4 changes: 3 additions & 1 deletion evrec/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def __init__(self) -> None:
with open(filename) as fp:
schema = json.load(fp)
name = filename.name.removesuffix(".json")
self.schemas[name] = self.VALIDATOR(schema)
self.schemas[name] = self.VALIDATOR(
schema, format_checker=self.VALIDATOR.FORMAT_CHECKER
)
self.logger.debug("Loaded schema %s from %s", name, filename)

def validate_message(self, topic: str, payload: bytes) -> None:
Expand Down
166 changes: 165 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pydantic-settings = "^2.3.3"
aiomqtt = "^2.1.0"
jwcrypto = "^1.5.6"
jsonformatter = "^0.3.2"
jsonschema = "^4.22.0"
jsonschema = {extras = ["format"], version = ">=4.22.0"}

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.0"
Expand Down

0 comments on commit 8016cbd

Please sign in to comment.