Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and Tinche committed Dec 10, 2024
1 parent c97932e commit 3357aab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1475,11 +1475,12 @@
- case: testNothingType
main: |
from typing import Optional
from attrs import NOTHING, NothingType
def takes_nothing(arg: NothingType | None) -> None:
def takes_nothing(arg: Optional[NothingType]) -> None:
return None
takes_nothing(NOTHING)
takes_nothing(None)
takes_nothing(1) # E: Argument 1 to "takes_nothing" has incompatible type "Literal[1]"; expected "Literal[_Nothing.NOTHING] | None" [arg-type]
takes_nothing(1) # E: Argument 1 to "takes_nothing" has incompatible type "Literal[1]"; expected "Literal[_Nothing.NOTHING] | None" [arg-type]

0 comments on commit 3357aab

Please sign in to comment.