Skip to content

Commit

Permalink
fix: make NonePrice.money a property
Browse files Browse the repository at this point in the history
`pyright` keeps complaining about `money` not being a property. `mypy`
does not.

The rationale of `pyright` developers seem to be right:

microsoft/pyright#2601 (comment)
  • Loading branch information
vst committed Jun 14, 2023
1 parent 7977dd4 commit a705315
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pypara/monetary.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,9 @@ def dov_or(self, default: Date) -> Date:
def convert(self, to: Currency, asof: Optional[Date] = None, strict: bool = False) -> "Price":
return self

money = NoMoney
@property
def money(self) -> Money:
return NoMoney

__bool__ = as_boolean

Expand Down

0 comments on commit a705315

Please sign in to comment.