Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix benchmark test #4138

Merged
merged 2 commits into from
Feb 23, 2021
Merged

Fix benchmark test #4138

merged 2 commits into from
Feb 23, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Feb 23, 2021

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

This MR fixes the currently broken benchmark test and adds a CI job to run the benchmark every time.

The fix doesn't require any changes in astroid. The register_plugins didn't filter .-foldernames (eg. .github) and thus modutils.load_module_from_file was called. Astroid uses importlib.import_module which interprets the . as a relative import. I believe it's highly unlikely that some project would define their plugins in a hidden directory which is why I added a simply filter for it.

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Related Issue

Closes #4119

--

cc: @Pierre-Sassoulas, @hippo91

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.452% when pulling ffd0574 on cdce8p:fix-benchmark into 80da123 on PyCQA:master.

@Pierre-Sassoulas
Copy link
Member

Thanks ! I think it also makes more sense to fix it this way.

@hippo91
Copy link
Contributor

hippo91 commented Feb 23, 2021

It clearly makes sense. Thanks !

@hippo91 hippo91 merged commit 646be6d into pylint-dev:master Feb 23, 2021
Pierre-Sassoulas pushed a commit that referenced this pull request Feb 23, 2021
* Don't check directories starting with '.' when using register_plugins

* CI - Add benchmark job
@cdce8p cdce8p deleted the fix-benchmark branch February 23, 2021 18:42
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.

Benchmark tests broken on master and 2.7.0
4 participants