Open bcm-at-zama opened 2 years ago
Hello, I've an issue with
def fun(x: bool = True): """This is my docstring. Args: x (bool, optional): some condition """ if x: print("A") print("B")
which gives a.py:fun:5: DAR103: ~x: expected bool but was bool, optional.
a.py:fun:5: DAR103: ~x: expected bool but was bool, optional
Remark that
def fun(x=True): """This is my docstring. Args: x (optional): some condition """ if x: print("A") print("B")
works fine, ie the problem seems to come from the : bool mypy hint.
: bool
Extra info:
1.8.1
% sw_vers ProductName: macOS ProductVersion: 11.6 BuildVersion: 20G165
Thanks for the tool by the way, it is very nice to build great doc for the user!
Hello, I've an issue with
which gives
a.py:fun:5: DAR103: ~x: expected bool but was bool, optional
.Remark that
works fine, ie the problem seems to come from the
: bool
mypy hint.Extra info: