Home

pyrightconfigjson

Pyrightconfig.json is the configuration file used by Pyright, a fast static type checker for Python. The file is written in JSON and is typically named pyrightconfig.json. Pyright reads this file at the root of a project to determine how to analyze code, resolve imports, and report type-related issues. In multi-root workspaces, additional configuration files can exist in subfolders to tailor analysis for a subset of the project.

A pyrightconfig.json file consists of options organized as key–value pairs. Common keys include: include, an array

The configuration is intended to be edited by developers or generated by editor integrations. Pyright automatically

For projects with complex environments, the file supports combining settings to balance coverage, performance, and correctness.

of
glob
patterns
describing
which
files
should
be
analysed;
exclude,
an
array
of
patterns
to
ignore;
typeCheckingMode,
which
selects
the
level
of
checking
(for
example
basic
or
strict);
pythonVersion,
the
target
Python
version;
extraPaths,
additional
directories
added
to
module
search
paths;
stubPath,
a
path
to
type
stub
files;
and
various
reporting
controls
such
as
reportMissingImports
or
reportMissingModuleSource.
There
are
also
options
like
logLevel
to
set
diagnostic
verbosity
and
useLibraryCodeForTypes
to
prefer
types
shipped
with
libraries
for
better
accuracy.
loads
pyrightconfig.json
when
you
run
the
checker
or
use
an
editor
extension;
nested
or
higher-scope
configurations
may
be
overridden
by
closer
files
in
the
directory
tree.
Changes
apply
to
that
project
or
workspace
until
overridden
by
another
configuration
file
in
subdirectories.