ert
ert copied to clipboard
Pylint ert
Everything in the ert repository should eventually pass pylint verification.
The current list of issues is given below (produced using --reports=y
option to pylint
):
$ pylint src tests docs test-data --reports=yes
[...]
Report
======
35779 statements analysed.
Statistics by type
------------------
+---------+-------+-----------+-----------+------------+---------+
|type |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module |707 |727 |-20.00 |11.32 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|class |496 |507 |-11.00 |25.40 |3.63 |
+---------+-------+-----------+-----------+------------+---------+
|method |2717 |2778 |-61.00 |50.24 |27.27 |
+---------+-------+-----------+-----------+------------+---------+
|function |1545 |1539 |+6.00 |26.02 |5.95 |
+---------+-------+-----------+-----------+------------+---------+
74969 lines have been analyzed
Raw metrics
-----------
+----------+-------+------+---------+-----------+
|type |number |% |previous |difference |
+==========+=======+======+=========+===========+
|code |52917 |70.59 |53022 |-105.00 |
+----------+-------+------+---------+-----------+
|docstring |7384 |9.85 |7428 |-44.00 |
+----------+-------+------+---------+-----------+
|comment |1644 |2.19 |3492 |-1848.00 |
+----------+-------+------+---------+-----------+
|empty |13024 |17.37 |13190 |-166.00 |
+----------+-------+------+---------+-----------+
Duplication
-----------
+-------------------------+------+---------+-----------+
| |now |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines |0 |0 |0 |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |0.000 |= |
+-------------------------+------+---------+-----------+
Messages by category
--------------------
+-----------+-------+---------+-----------+
|type |number |previous |difference |
+===========+=======+=========+===========+
|convention |127 |134 |134 |
+-----------+-------+---------+-----------+
|refactor |143 |153 |153 |
+-----------+-------+---------+-----------+
|warning |760 |785 |785 |
+-----------+-------+---------+-----------+
|error |22 |39 |39 |
+-----------+-------+---------+-----------+
Messages
--------
+-------------------------------+------------+
|message id |occurrences |
+===============================+============+
|unspecified-encoding |398 |
+-------------------------------+------------+
|redefined-outer-name |258 |
+-------------------------------+------------+
|too-many-arguments |59 |
+-------------------------------+------------+
|wrong-import-position |46 |
+-------------------------------+------------+
|consider-using-f-string |35 |
+-------------------------------+------------+
|too-many-instance-attributes |30 |
+-------------------------------+------------+
|unused-variable |28 |
+-------------------------------+------------+
|import-outside-toplevel |25 |
+-------------------------------+------------+
|line-too-long |20 |
+-------------------------------+------------+
|too-many-statements |18 |
+-------------------------------+------------+
|import-error |18 |
+-------------------------------+------------+
|attribute-defined-outside-init |18 |
+-------------------------------+------------+
|unused-private-member |15 |
+-------------------------------+------------+
|c-extension-no-member |15 |
+-------------------------------+------------+
|broad-except |14 |
+-------------------------------+------------+
|keyword-arg-before-vararg |11 |
+-------------------------------+------------+
|too-many-return-statements |10 |
+-------------------------------+------------+
|too-many-branches |10 |
+-------------------------------+------------+
|abstract-method |8 |
+-------------------------------+------------+
|unnecessary-dict-index-lookup |7 |
+-------------------------------+------------+
|too-many-public-methods |7 |
+-------------------------------+------------+
|no-value-for-parameter |3 |
+-------------------------------+------------+
|missing-timeout |3 |
+-------------------------------+------------+
|deprecated-module |3 |
+-------------------------------+------------+
|assert-on-string-literal |3 |
+-------------------------------+------------+
|unused-import |1 |
+-------------------------------+------------+
|unexpected-keyword-arg |1 |
+-------------------------------+------------+
|too-many-nested-blocks |1 |
+-------------------------------+------------+
|inconsistent-return-statements |1 |
+-------------------------------+------------+
|bad-classmethod-argument |1 |
+-------------------------------+------------+
------------------------------------------------------------------
Your code has been rated at 9.68/10 (previous run: 9.65/10, +0.03)
Only partially resolved by https://github.com/equinor/ert/pull/3313
This issue has an interesting history of open/close :sweat_smile: I am a bit inclined to close it, and split it into separate issues that can be closed individually, because this is currently an epic.
Yes, there are perhaps few enough remaining pylint issue to have one open for each of them.
Following the new release of pylint, we changed the requirements back a step again in #4777 as it would start complaining about existing code and message ids which it previously did not discover. This is not to say that it shouldn't be fixed, but it makes sense to do so in a timely manner that doesn't block merges to main as there is no regression in quality.
@berland We probably need to update this issue for the upcoming hacktoberfest.
Superseded by #7377