Skip to content

Commit bb05063

Browse files
authored
Update pyright configs comments (#4618)
2 parents 3c4d707 + df12ccb commit bb05063

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

.github/workflows/pyright.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- gh-readonly-queue/**
1010
tags:
1111
# required if branches-ignore is supplied (jaraco/skeleton#103)
12-
- '**'
12+
- "**"
1313
pull_request:
1414
workflow_dispatch:
1515

@@ -24,15 +24,17 @@ env:
2424
# pin pyright version so a new version doesn't suddenly cause the CI to fail,
2525
# until types-setuptools is removed from typeshed.
2626
# For help with static-typing issues, or pyright update, ping @Avasam
27+
#
28+
# An exact version from https://github.com/microsoft/pyright/releases or "latest"
2729
PYRIGHT_VERSION: "1.1.377"
2830

2931
# Environment variable to support color support (jaraco/skeleton#66)
3032
FORCE_COLOR: 1
3133

3234
# Suppress noisy pip warnings
33-
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
34-
PIP_NO_PYTHON_VERSION_WARNING: 'true'
35-
PIP_NO_WARN_SCRIPT_LOCATION: 'true'
35+
PIP_DISABLE_PIP_VERSION_CHECK: "true"
36+
PIP_NO_PYTHON_VERSION_WARNING: "true"
37+
PIP_NO_WARN_SCRIPT_LOCATION: "true"
3638

3739
jobs:
3840
pyright:
@@ -65,7 +67,7 @@ jobs:
6567
else
6668
echo '> pip install pyright==${{ env.PYRIGHT_VERSION }}'
6769
fi
68-
echo 'pyright --threads'
70+
echo '> pyright --threads'
6971
shell: bash
7072
- name: Run pyright
7173
uses: jakebailey/pyright-action@v2

pyrightconfig.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json",
33
"exclude": [
4+
// Avoid scanning Python files in generated folders
45
"build",
56
".tox",
67
".eggs",
7-
"**/_vendor", // Vendored
8-
"setuptools/_distutils", // Vendored
9-
"setuptools/config/_validate_pyproject/**", // Auto-generated
8+
"setuptools/config/_validate_pyproject/**",
9+
// These are vendored
10+
"**/_vendor",
11+
"setuptools/_distutils",
1012
],
1113
// Our testing setup doesn't allow passing CLI arguments, so local devs have to set this manually.
1214
// "pythonVersion": "3.8",
@@ -15,15 +17,13 @@
1517
"typeCheckingMode": "basic",
1618
// Too many issues caused by dynamic patching, still worth fixing when we can
1719
"reportAttributeAccessIssue": "warning",
18-
// Fails on Python 3.12 due to missing distutils and on cygwin CI tests
19-
"reportAssignmentType": "warning",
20+
// Fails on Python 3.12 due to missing distutils
2021
"reportMissingImports": "warning",
21-
"reportOptionalCall": "warning",
2222
// FIXME: A handful of reportOperatorIssue spread throughout the codebase
2323
"reportOperatorIssue": "warning",
2424
// Deferred initialization (initialize_options/finalize_options) causes many "potentially None" issues
25-
// TODO: Fix with type-guards or by changing how it's initialized
26-
"reportArgumentType": "warning", // A lot of these are caused by jaraco.path.build's spec argument not being a Mapping https://github.com/jaraco/jaraco.path/pull/3
25+
// TODO: Fix with type-guards, by changing how it's initialized, or by casting initial assignments
26+
"reportArgumentType": "warning",
2727
"reportCallIssue": "warning",
2828
"reportGeneralTypeIssues": "warning",
2929
"reportOptionalIterable": "warning",

0 commit comments

Comments
 (0)