Skip to content

Moving Poetry install directory to $GITHUB_WORKSPACE/.cache breaks nps lint with default excludes #33

Description

@bkeryan

Bug Report

Upgrading nidaqmx-python to ni/python-actions v0.6.0 fails because this directory is not in ni-python-styleguide's default exclude list.

Repro or Code Sample

https://github.com/ni/nidaqmx-python/actions/runs/18046886197/job/51359726494?pr=845

Expected Behavior

Existing workflows continue to work.

Current Behavior

Existing workflows now emit style errors for files in .cache:

Run poetry run ni-python-styleguide lint
/home/runner/work/nidaqmx-python/nidaqmx-python/.venv/lib/python3.9/site-packages/flake8_import_order/styles.py:3: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import iter_entry_points
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:1:1: D100 Missing docstring in public module
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'AbstractSet' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'AnyStr' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'BinaryIO' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'Callable' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'Collection' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'Container' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'Dict' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'FrozenSet' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'Hashable' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'IO' in __all__
./.cache/poetry/home/lib/python3.9/site-packages/typing_extensions.py:21:1: F822 undefined name 'ItemsView' in __all__

Possible Solution

  • Move it out of $GITHUB_WORKSPACE
  • Change ni-python-styleguide default excludes

Context

ni/nidaqmx-python#845

Your Environment

  • ni/python-actions version: v0.6.0
  • Python version: 3.11.9

AB#3336072

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions