git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Type checking


On Sat, 19 Oct 2019 21:58:23 -0700
Paul Rubin <no.email at nospam.invalid> wrote:

> Manfred Lotz <ml_news at posteo.de> writes:
> > def main():
> >     print(greeting(1))
> >
> > Any idea why mypy doesn't detect anything?  
> 
> 
> "main" doesn't have a type signature so it doesn't get checked.  The
> mypy docs explain this.  Try:
> 
>   def main() -> None:
>       print(greeting(1))

Aah, such easy. As pytype did it I didn't assume something like this.

Thanks a lot.

-- 
Manfred