Skip to content

fix: update pylint to ignore import-errors - #5927

Merged
ferrarimarco merged 1 commit into
super-linter:mainfrom
Shop-kins:fix/disable-import-error
Jul 31, 2024
Merged

ferrarimarco merged 1 commit into
super-linter:mainfrom
Shop-kins:fix/disable-import-error

Conversation

@Shop-kins

@Shop-kins Shop-kins commented Jul 25, 2024 •

Copy link
Copy Markdown
Contributor

Adds back import-error to the pylint disable rules that was removed as of: #5252

Fix #5926

Proposed changes

update .python-lint to include disable=import-error

Also adds a new test case for import errors

Readiness checklist

In order to have this pull request merged, complete the following tasks.

Pull request author tasks

  • I checked that all workflows return a success.
  • I included all the needed documentation for this change.
  • I provided the necessary tests.
  • I squashed all the commits into a single commit.
  • I followed the Conventional Commit v1.0.0 spec.
  • [N/A] I wrote the necessary upgrade instructions in the upgrade guide.
  • If this pull request is about and existing issue,
  • I added the Fix #ISSUE_NUMBER or Close #ISSUE_NUMBER text to the description of the pull request.

Super-linter maintainer tasks

  • Label as breaking if this change breaks compatibility with the previous released version.
  • Label as either: automation, bug, documentation, enhancement, infrastructure.
  • Add the pull request to a milestone, eventually creating one, that matches with the version that release-please proposes.

@Shop-kins
Shop-kins marked this pull request as ready for review July 25, 2024 12:50
@ferrarimarco ferrarimarco self-assigned this Jul 25, 2024
@ferrarimarco ferrarimarco added bug Something isn't working O: backlog 🤖 Backlog, stale ignores this label labels Jul 25, 2024
@ferrarimarco ferrarimarco added this to the 6.8.0 milestone Jul 25, 2024

@ferrarimarco ferrarimarco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this PR. A small thing to check.

Comment thread TEMPLATES/.python-lint
@Shop-kins
Shop-kins force-pushed the fix/disable-import-error branch from 9073c94 to 09bcadb Compare July 25, 2024 13:04
@ferrarimarco

Copy link
Copy Markdown
Collaborator

Thanks!

@ferrarimarco

Copy link
Copy Markdown
Collaborator

Thanks for the update.

The builds are failing because:

  1. the commit message has a capital letter.
  2. There's an ad-hoc configuration file that we use for pylint when it runs against the super-linter codebase that we should either update, or remove.

Can you please fix the commit message?

Meanwhile, I'll check if we need that second configuration file or not.

Comment thread TEMPLATES/.python-lint
@ferrarimarco

Copy link
Copy Markdown
Collaborator

By rebasing on top of the latest main, the pylint check should now pass.

@Shop-kins
Shop-kins force-pushed the fix/disable-import-error branch 5 times, most recently from 7e3d9bb to cb9be54 Compare July 29, 2024 08:48
@Shop-kins

Copy link
Copy Markdown
Contributor Author

By rebasing on top of the latest main, the pylint check should now pass.

Have rebased and removed the capitals!

@ferrarimarco

Copy link
Copy Markdown
Collaborator

Thanks!

@ferrarimarco ferrarimarco changed the title fix: Update pylint to ignore import-errors fix: update pylint to ignore import-errors Jul 30, 2024

@ferrarimarco ferrarimarco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A minor thing to fix, and we shall be good to go!

Thanks for this work :)

Comment thread test/linters/python_pylint/python_good_2.py
-re-instates previous super-linter pylint functionality

-ignoring import errors is desired as super-linter does not
 support installing dependencies as it runs

-creates a new test case file for confirming
 import-errors are disabled this consists of a 3rd
 party import and a basic usage
@ferrarimarco
ferrarimarco force-pushed the fix/disable-import-error branch from cb9be54 to 5c0eb8d Compare July 31, 2024 07:00
@ferrarimarco
ferrarimarco enabled auto-merge July 31, 2024 07:26
@ferrarimarco
ferrarimarco disabled auto-merge July 31, 2024 07:27
@ferrarimarco
ferrarimarco merged commit eec862d into super-linter:main Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working O: backlog 🤖 Backlog, stale ignores this label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression of pylint config - import-error's are no longer disabled

2 participants