Skip to content

Commit

Permalink
Pyright ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
laurensWe committed Nov 7, 2024
1 parent 27ac252 commit a5be8f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tests/api/routes/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ async def test_find_measure_task() -> None:

# matches measure
measure = find_measure_task(test_project.system_card, "urn:nl:ak:mtr:bnd-01")
assert measure.urn == "urn:nl:ak:mtr:bnd-01"
assert measure.value is not None
assert measure.urn == "urn:nl:ak:mtr:bnd-01" # pyright: ignore [reportOptionalMemberAccess]
assert measure.value is not None # pyright: ignore [reportOptionalMemberAccess]

# no measures in system_card
test_project.system_card.measures = []
Expand All @@ -433,8 +433,8 @@ async def test_find_requirement_task() -> None:

# matches measure
requirement = find_requirement_task(test_project.system_card, "urn:nl:ak:ver:aia-05")
assert requirement.urn == "urn:nl:ak:ver:aia-05"
assert requirement.state is not None
assert requirement.urn == "urn:nl:ak:ver:aia-05" # pyright: ignore [reportOptionalMemberAccess]
assert requirement.state is not None # pyright: ignore [reportOptionalMemberAccess]

# no measures in system_card
test_project.system_card.requirements = []
Expand Down
4 changes: 2 additions & 2 deletions tests/core/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def test_RepositoryNoResultFound():

def test_AMTError():
e = AMTError()
e.detail = "test"
res = e.getmessage(NullTranslations())
e.detail = "test" # pyright: ignore [reportAttributeAccessIssue]
res = e.getmessage(NullTranslations()) # pyright: ignore [reportArgumentType]

assert res == "test"

Expand Down

0 comments on commit a5be8f6

Please sign in to comment.