Skip to content

Commit

Permalink
Update pyright configs comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Aug 30, 2024
1 parent 94ee160 commit 2667e5c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- gh-readonly-queue/**
tags:
# required if branches-ignore is supplied (jaraco/skeleton#103)
- '**'
- "**"
pull_request:
workflow_dispatch:

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

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

# Suppress noisy pip warnings
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
PIP_NO_PYTHON_VERSION_WARNING: 'true'
PIP_NO_WARN_SCRIPT_LOCATION: 'true'
PIP_DISABLE_PIP_VERSION_CHECK: "true"
PIP_NO_PYTHON_VERSION_WARNING: "true"
PIP_NO_WARN_SCRIPT_LOCATION: "true"

jobs:
pyright:
Expand Down Expand Up @@ -65,7 +67,7 @@ jobs:
else
echo '> pip install pyright==${{ env.PYRIGHT_VERSION }}'
fi
echo 'pyright --threads'
echo '> pyright --threads'
shell: bash
- name: Run pyright
uses: jakebailey/pyright-action@v2
Expand Down
16 changes: 8 additions & 8 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json",
"exclude": [
// Avoid scanning Python files in generated folders
"build",
".tox",
".eggs",
"**/_vendor", // Vendored
"setuptools/_distutils", // Vendored
"setuptools/config/_validate_pyproject/**", // Auto-generated
"setuptools/config/_validate_pyproject/**",
// These are vendored
"**/_vendor",
"setuptools/_distutils",
],
// Our testing setup doesn't allow passing CLI arguments, so local devs have to set this manually.
// "pythonVersion": "3.8",
Expand All @@ -15,15 +17,13 @@
"typeCheckingMode": "basic",
// Too many issues caused by dynamic patching, still worth fixing when we can
"reportAttributeAccessIssue": "warning",
// Fails on Python 3.12 due to missing distutils and on cygwin CI tests
"reportAssignmentType": "warning",
// Fails on Python 3.12 due to missing distutils
"reportMissingImports": "warning",
"reportOptionalCall": "warning",
// FIXME: A handful of reportOperatorIssue spread throughout the codebase
"reportOperatorIssue": "warning",
// Deferred initialization (initialize_options/finalize_options) causes many "potentially None" issues
// TODO: Fix with type-guards or by changing how it's initialized
"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
// TODO: Fix with type-guards, by changing how it's initialized, or by casting initial assignments
"reportArgumentType": "warning",
"reportCallIssue": "warning",
"reportGeneralTypeIssues": "warning",
"reportOptionalIterable": "warning",
Expand Down

0 comments on commit 2667e5c

Please sign in to comment.