.PYI Bestandsextensie

Python Interface Definition

Ontwikkelaar Python Software Foundation
Populariteit
4.2  |  5 Stemmen
 

Wat is een PYI-bestand?

A PYI file is a code stub used to specify type hints for a Python module. Python type checkers can read PYI files and use them to warn developers of potential type mismatches. PYI files have the same syntax as regular Python modules; they are typically stored alongside the module for which they contain type hints.

Meer informatie

Schermafbeelding van een .pyi-bestand in Microsoft Visual Studio Code
PYI-bestand geopend in Microsoft Visual Studio Code

Because Python is a dynamically-typed programming language, the Python interpreter performs type checking only when code runs. However, some Python code editors allow developers to manually define and check a module's types while coding, using PYI files. That way, developers can catch and fix type errors before attempting to run their program.

For example, JetBrains PyCharm allows developers to check types using PYI files. If a developer's code creates a mismatch between a module's actual and defined types, PyCharm will warn the developer.

Een PYI-bestand openen

You can open and edit a PYI file in any text or source code editor. Source code editors, such as Microsoft Visual Studio Code (multiplatform), Sublime Text (multiplatform), and JetBrains PyCharm (multiplatform), provide helpful syntax-highlighting and code-editing tools that make reviewing and editing PYI files easier.

Open meer dan 400 bestandsformaten met File Viewer Plus.Gratis downloaden

Programma's die PYI-bestanden openen

Windows
Inbegrepen bij het besturingssysteem
Gratis
Gratis proefversie
Linux
Gratis
Gratis
Gratis proefversie

Geverifieerd door FileInfo.com

Het FileInfo.com-team heeft onafhankelijk onderzoek gedaan naar het Python Interface Definition-bestandsformaat en de Mac, Windows, and Linux-apps die op deze pagina worden vermeld. Ons doel is 100% nauwkeurigheid en we publiceren alleen informatie over bestandstypen die we hebben geverifieerd.

Als u aanvullingen of updates voor deze pagina wilt voorstellen, kunt u het ons laten weten.