Python Type Checker Mypy receives experimental semantic analyzer

Mypy is an optional static type checker for Python. In version 0.710 he brings along a new feature: an experimental semantic analyzer. The details were presented by Guido van Rossum on the Mypy blog.

In PEP 484 type hints for Python were introduced, whereupon static type checking became possible. One of the tools developed for this purpose is Mypy. Python inventor Guido van Rossum is also involved in the project, which is why he presented the new semantic analyzer and the other features in Mypy 0.710 in a blog entry.

Experimental semantic analyzer

The new release Mypy 0.710 has an experimental semantic analyzer on board. The new component binds names to definitions. It should keep track of what each name defines, eg. For example, a function or a type alias. It is a revised version of the semantic analyzer, which is why it is called a new semantic analyzer. Above all, the handling of import cycles and forward references should have improved in the new version.

The new semantic analyzer can be activated in two ways: either through the command-line –new-semantic-analyzer or by setting new_semantic_analyzer = True in the Mypy configuration file, usually mypi.ini . For more information about activation, see the documentation .

Other features in Mypy 0.710

Other new features in version 0.710 include additional in-line configuration capabilities. By per-file configuration flags in # Mypy: comments z. Eg # Mypy: no-strict-optional at the beginning of the file. This will disable strict optional checking for this file. In addition, the new release contains some more new features as well as inference improvements and bug fixes.

Mypy is available via PyPI (Python Package Index) . There is already the current version 0.711 ready, which fixes two minor bugs from Mypy 0.710.

On the Mypy blog, Guido van Rossum introduced the new features in version 0.710 and described the bug fixes in version 0.711.

Recent Articles

5 tips for effective remote pair programming

Home office is a challenge where people work and communicate closely together. Pair programming, i.e. working together on a source code, also lives from...

What are the Reasons You Should Play Online Bingo?

Online bingo is fast becoming popular among the masses. It uses unique bingo software to bring fun to you without you having to go somewhere to...

Most in-demand IT jobs from last decade

Uber for travel, Netflix for leisure and Google for everything is the ideal routine that we all wish to follow, of course with Instagram...

The finest text editor for professional bloggers

It is a fact that blogs have replaced books and magazines due to increasing popularity of the online world. Serious readers subscribe to blogs...

Angular 9 final release released

Angular 9 final is here! The new version was released a little late. Ivy is of course one of the new features, but that's...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here