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 various problems with --import-graph filename parsing #4259

Merged
merged 4 commits into from Mar 29, 2021
Merged

Fix various problems with --import-graph filename parsing #4259

merged 4 commits into from Mar 29, 2021

Conversation

howeaj
Copy link
Contributor

@howeaj howeaj commented Mar 28, 2021

Description

The pre-existing code looks extremely dodgy, but I've tried to avoid making any backwards-incompatible changes while fixing some problems that made it very difficult to work out how to use this option.

Changes:

  • Raise error if graphvis is not installed (instead of mistakenly reporting success)
  • Fix tempfile creation bug when outputfile includes directories
  • Fix bug when using file extension that isn't 3 characters long
  • Fix confusing help text
  • Rename deprecated .dot extension to .gv
  • Default to .png if no extension is specified

Type of Changes

Type
🐛 Bug fix

@coveralls
Copy link

coveralls commented Mar 28, 2021

Coverage Status

Coverage increased (+0.02%) to 91.454% when pulling b2cf4b2 on howeaj:master into 42bf3b0 on PyCQA:master.

Avoids backwards-incompatible changes.
 - Raise error if graphvis is not installed (instead of reporting success)
 - Fix tempfile creation bug when outputfile includes directories
 - Fix bug when using file extension that isn't 3 characters long
 - Fix confusing help text
 - Rename deprecated .dot extension to .gv
 - Default to .png if no extension is specified
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Thank you for this pull request ! Would it be possible to add some tests for it ?

pylint/graph.py Outdated Show resolved Hide resolved
pylint/checkers/imports.py Show resolved Hide resolved
ChangeLog Show resolved Hide resolved
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.7.4 milestone Mar 28, 2021
@Pierre-Sassoulas Pierre-Sassoulas added Documentation 📗 Enhancement ✨ Improvement to a component pyreverse Related to pyreverse component labels Mar 28, 2021
howeaj and others added 2 commits March 28, 2021 15:07
(and ignore mypy thinking codecs.open() returns an int)
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.7.4, 2.7.3 Mar 29, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit a37c643 into pylint-dev:master Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation 📗 Enhancement ✨ Improvement to a component pyreverse Related to pyreverse component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants