Skip to content

Commit

Permalink
Fix pydantic field alias
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurk93 committed Dec 5, 2023
1 parent 978d6c6 commit 60c2618
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion secureli/repositories/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class PreCommitRepo(BaseModel):
Repo settings for pre-commit.
"""

url: str = Field(validation_alias="repo", serialization_alias="repo")
url: str = Field(alias="repo")
rev: str
hooks: list[PreCommitHook] = Field(default=[])
suppressed_hook_ids: list[str] = Field(default=[])
Expand Down
2 changes: 1 addition & 1 deletion tests/abstractions/test_pre_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def settings_dict() -> dict:
return PreCommitSettings(
repos=[
PreCommitRepo(
url="http://example-repo.com/",
repo="http://example-repo.com/",
rev="master",
hooks=[
PreCommitHook(
Expand Down
2 changes: 1 addition & 1 deletion tests/actions/test_scan_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def mock_pre_commit() -> MagicMock:
mock_pre_commit.get_pre_commit_config.return_value = PreCommitSettings(
repos=[
PreCommitRepo(
url="http://example-repo.com/",
repo="http://example-repo.com/",
rev="master",
hooks=[
PreCommitHook(
Expand Down

0 comments on commit 60c2618

Please sign in to comment.