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

Dependency graphs are not exported to files #9001

Closed
amamla opened this issue Sep 4, 2023 · 0 comments · Fixed by #9003 or #9093
Closed

Dependency graphs are not exported to files #9001

amamla opened this issue Sep 4, 2023 · 0 comments · Fixed by #9003 or #9093
Labels
Milestone

Comments

@amamla
Copy link
Contributor

amamla commented Sep 4, 2023

Bug description

When trying to export dependency graphs generated by imports checker (RP0401 or RP0402) to files, nothing happens (files are not generated).

Running checker for one simple file:

# my_module.py

import json
import pylint

Configuration

No response

Command used

pylint --reports=y --disable=all --enable=imports,RP0401,RP0402 --import-graph=imports_all.gv --ext-import-graph=imports_ext.gv --int-import-graph=imports_int.gv my_module.py

Pylint output

Output doesn't contain any mentions about dependency graphs:

Report
======
2 statements analysed.

Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |1      |1          |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |0      |NC         |NC         |0           |0        |
+---------+-------+-----------+-----------+------------+---------+
|method   |0      |NC         |NC         |0           |0        |
+---------+-------+-----------+-----------+------------+---------+
|function |0      |NC         |NC         |0           |0        |
+---------+-------+-----------+-----------+------------+---------+



6 lines have been analyzed

Raw metrics
-----------

(...)

Files imports_all.gv, imports_ext.gv and imports_int.gv are missing.

Expected behavior

Output should contain information about dependencies and exported graphs:

Report
======
2 statements analysed.

Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |1      |1          |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |0      |NC         |NC         |0           |0        |
+---------+-------+-----------+-----------+------------+---------+
|method   |0      |NC         |NC         |0           |0        |
+---------+-------+-----------+-----------+------------+---------+
|function |0      |NC         |NC         |0           |0        |
+---------+-------+-----------+-----------+------------+---------+



External dependencies
---------------------
::

    pylint (my_module)



Modules dependencies graph
--------------------------
imports graph has been written to imports_all.gv
external imports graph has been written to imports_ext.gv
internal imports graph has been written to imports_int.gv


6 lines have been analyzed

Raw metrics
-----------

(...)

Files imports_all.gv, imports_ext.gv and imports_int.gv should be present and not empty.

Pylint version

pylint 3.0.0a8-dev0
astroid 3.0.0a9
Python 3.11.5 (main, Aug 25 2023, 13:19:53) [GCC 9.4.0]

tested also on:

pylint 2.17.5
astroid 2.15.6
Python 3.11.4 (main, Jun 12 2023, 01:56:19) [Clang 11.1.0 ]

OS / Environment

No response

Additional dependencies

No response

@amamla amamla added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Sep 4, 2023
@Pierre-Sassoulas Pierre-Sassoulas added Bug 🪲 and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Sep 4, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.17.6 milestone Sep 4, 2023
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.17.6, 3.0.0a8 Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants