<#19368 Pyright fails in Github action> Issue crea...
# github-notifications
c
#19368 Pyright fails in Github action Issue created by CJTurpie Describe the bug When running
pants check ::
as part of a GitHub action, sometimes (but not always), pyright fails the check, it looks like its failing to find any of the 3rd party imports with lots of errors such as (file path redacted):
Copy code
/tmp/pants-sandbox-zZouYc/.../models.py
  /tmp/pants-sandbox-zZouYc/.../models.py:7:6 - error: Import "pydantic" could not be resolved (reportMissingImports)
There are hundreds of these errors, seemingly for every third party import, any idea on how to start debugging this or how to resolve it? Pants version 2.16 OS n/a running on Github action Additional info Relevant parts of action yml file
Copy code
steps:
      - name: Check out repository code
        uses: actions/checkout@v3

      - name: Initialise Pants
        uses: pantsbuild/actions/init-pants@v4-scie-pants
        with:
          gha-cache-key: cache0-py3.10
          named-caches-hash: ${{ hashFiles('3rdparty/python/default.lock') }}
          cache-lmdb-store: "true"

      - name: Setup Python
        id: setup-python
        uses: actions/setup-python@v4
        with:
          python-version: "3.10"

      - name: Check BUILD files
        run: |
          pants tailor --check update-build-files --check ::

      - name: Lint and type check
        run: |
          pants lint check ::

      - name: Test
        run: |
          pants test ::
pantsbuild/pants