Type checking
Manfred Lotz
ml_news at posteo.de
Sun Oct 20 00:40:34 EDT 2019
I had a look into type checking and tried a very simple example like
the following:
#!/usr/bin/env python3
def greeting(name: str) -> str:
return 'Hello ' + name
def main():
print(greeting(1))
if __name__ == "__main__":
main()
pytype complained as expected.
BUT mypy says;
Success: no issues found in 1 source file
This is a Fedora 31 systems with:
Python 3.7.4
mypy 0.730
Any idea why mypy doesn't detect anything?
--
Manfred
More information about the Python-list
mailing list