Skip to content

Check analyzers action allows warnings from Pyright #114

@jfriedri-ni

Description

@jfriedri-ni

Bug Report

The check_analyzers.yml workflow runs Pyright static analysis, and when the tool emits warnings, the checks pass.

Repro or Code Sample

Example

https://github.com/ni/ni-apis-python/actions/runs/17439900411/job/49519891808?pr=100#step:13:27

/home/runner/work/ni-apis-python/ni-apis-python/packages/ni.measurementlink.sessionmanagement.v1.client/src/ni/measurementlink/sessionmanagement/v1/client/_reservation.py:278:43 - warning: TypeVar "TMultiplexerSession" appears only once in generic function signature
Use "object" instead (reportInvalidTypeVarUse)

Expected Behavior

We expect the checks to fail on Pyright warnings.

Current Behavior

Currently the checks pass on Pyright warnings.

Possible Solution

Update the Pyright configuration for each project

  • use strict mode if the new errors are fixable
  • or promote the severity of selected rules from "warning" to "error"

Context

I noticed these Alerts when reviewing PRs

Image

Your Environment

  • ni-apis-python version: main
  • Python version: 3.11

AB#3251205

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issue that needs to be reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions