.PYI ファイル拡張子

Python Interface Definition

開発元 Python Software Foundation
人気度
4.2  |  5 
 

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.

詳細情報

Microsoft Visual Studio Codeで開いた.pyiファイルのスクリーンショット
Microsoft Visual Studio Codeで開いたPYIファイル

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.

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.

File Viewer Plusで400種類以上のファイル形式を開けます。無料ダウンロード

PYIファイルを開くプログラム

カテゴリ: 開発者
更新日: 2022-03-21

検証者 FileInfo.com

FileInfo.comチーム は、このページに掲載されているPython Interface Definitionファイル形式とMac, Windows, and Linuxアプリについて独自に調査しました。 私たちの目標は100%の正確性であり、検証済みのファイルタイプに関する情報のみを公開しています。

このページへの追加や更新をご提案いただける場合は、お知らせください。