.PYI Extension de fichier

Python Interface Definition

Développeur Python Software Foundation
Popularité
4.2  |  5 Votes
 

Qu'est-ce qu'un fichier PYI ?

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.

Plus d'informations

Capture d'écran d'un fichier .pyi dans Microsoft Visual Studio Code
Fichier PYI ouvert dans 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.

Comment ouvrir un fichier PYI

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.

Ouvrez plus de 400 formats de fichiers avec File Viewer Plus.Téléchargement gratuit

Programmes qui ouvrent les fichiers PYI

Windows
Inclus avec l'OS
Gratuit
Version d'essai gratuite
Mac
Linux
Gratuit
Gratuit
Version d'essai gratuite

Vérifié par FileInfo.com

L'équipe FileInfo.com a mené des recherches indépendantes sur le format de fichier Python Interface Definition et les applications Mac, Windows, and Linux répertoriées sur cette page. Notre objectif est une précision de 100%, et nous ne publions que des informations sur les types de fichiers que nous avons vérifiés.

Si vous souhaitez suggérer des ajouts ou des mises à jour de cette page, faites-le-nous savoir.