Skip to content

Fix multitude of warnings#305

Merged
mshafer-NI merged 7 commits into
ni:mainfrom
mshafer-NI:dev/fixup_warnings
Jun 18, 2026
Merged

Fix multitude of warnings#305
mshafer-NI merged 7 commits into
ni:mainfrom
mshafer-NI:dev/fixup_warnings

Conversation

@mshafer-NI

Copy link
Copy Markdown
Collaborator

Justification

Currently, running ni-python-styleguide on a code base will print a lot of warnings like

.venv\Lib\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

Upgrading to newer flake8-import-order and removing the pin on setuptools resolves this.

This also resolves #226

@mshafer-NI mshafer-NI requested a review from Copilot June 18, 2026 15:42
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for contributing! 👋

@mshafer-NI mshafer-NI marked this pull request as ready for review June 18, 2026 15:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces runtime warnings emitted by ni-python-styleguide by updating the flake8-import-order dependency (and removing the direct setuptools pin that was needed for older flake8-import-order versions), aligning with the goal of resolving the warning noise described in the PR and addressing #226.

Changes:

  • Bump flake8-import-order to 0.19.2 and drop the direct setuptools pin in pyproject.toml.
  • Regenerate poetry.lock to reflect the dependency update.
  • Remove the Renovate rule that previously disabled updates for flake8-import-order / setuptools.
  • Adjust the “bare CLI” tests’ success assertions/output checks.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/test_cli/test_bare.py Updates assertions for invoking the CLI with no args / --help.
pyproject.toml Updates dependency constraints (notably flake8-import-order) and removes the direct setuptools pin.
poetry.lock Locks flake8-import-order at 0.19.2 and updates the lock metadata accordingly.
.github/renovate.json Removes the rule that disabled Renovate updates for the previously pinned packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_cli/test_bare.py
Comment thread tests/test_cli/test_bare.py
@mshafer-NI mshafer-NI merged commit af5b9c1 into ni:main Jun 18, 2026
28 checks passed
@mshafer-NI mshafer-NI deleted the dev/fixup_warnings branch June 18, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix behavior does not match flake8-import-order >= 0.19.0 behavior

4 participants