Skip to content

Commit

Permalink
Fix out HttpUrl being overwrittn by import * from files that do n…
Browse files Browse the repository at this point in the history
…ot define `__all__` (#15408)
  • Loading branch information
themylogin authored Jan 16, 2025
1 parent 7dede65 commit e641739
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/middlewared/middlewared/api/base/types/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@

from middlewared.api.base.validators import https_only_check

__all__ = ["HttpsOnlyURL"]


HttpsOnlyURL = Annotated[HttpUrl, AfterValidator(https_only_check)]
2 changes: 2 additions & 0 deletions src/middlewared/middlewared/api/base/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from pydantic import HttpUrl

__all__ = ["match_validator", "time_validator"]


def match_validator(pattern: re.Pattern, explanation: str | None = None):
def validator(value: str):
Expand Down

0 comments on commit e641739

Please sign in to comment.