Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Aug 15, 2022
1 parent fa62489 commit 3aa4385
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts-dev/check_pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def do_lint() -> Set[str]:
failures = set()

with monkeypatch_pydantic():
logger.debug("Importing synapse")
try:
# TODO: make "synapse" an argument so we can target this script at
# a subpackage
Expand All @@ -210,6 +211,7 @@ def do_lint() -> Set[str]:
return failures

try:
logger.debug("Fetching subpackages")
module_infos = list(
pkgutil.walk_packages(module.__path__, f"{module.__name__}.")
)
Expand Down Expand Up @@ -382,7 +384,7 @@ class C(BaseModel):
("TypedDict('D', x=StrictInt)",),
]
)
def test_field_holding_accepted_type_raises(self, annotation: str) -> None:
def test_field_holding_accepted_type_doesnt_raise(self, annotation: str) -> None:
with monkeypatch_pydantic():
run_test_snippet(
f"""
Expand All @@ -405,7 +407,7 @@ class C(BaseModel):


parser = argparse.ArgumentParser()
parser.add_argument("mode", choices=["lint", "test"], default="lint")
parser.add_argument("mode", choices=["lint", "test"], default="lint", nargs="?")
parser.add_argument("-v", "--verbose", action="store_true")


Expand Down

0 comments on commit 3aa4385

Please sign in to comment.