Skip to content

fix linter errors in etcdb/cursor.py #8

Description

@akuzminsky
  • Etcd Database Driver version: 1.0.3

Description

pylint fails on etcdb/cursor.py

What I Did

$ pylint etcdb/cursor.py
************* Module etcdb.cursor
W:726, 0: TODO take into account modifiedIndex because race condition is possible (fixme)
C:106, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C:  1, 0: Missing module docstring (missing-docstring)
E:  8, 0: Unable to import 'pyetcd' (import-error)
C: 14, 0: Missing class docstring (missing-docstring)
R: 14, 0: Too few public methods (0/2) (too-few-public-methods)
C: 27, 0: Missing function docstring (missing-docstring)
W: 27,27: Unused argument 'where' (unused-argument)
W: 27,22: Unused argument 'row' (unused-argument)
R: 33, 0: Too many instance attributes (8/7) (too-many-instance-attributes)
C: 83, 4: Missing method docstring (missing-docstring)
C: 87, 4: Missing method docstring (missing-docstring)
C: 91, 4: Missing method docstring (missing-docstring)
C:155, 4: Invalid argument name "n" (invalid-name)
W:159,12: Unused variable 'i' (unused-variable)
R:186, 4: Too many local variables (16/15) (too-many-locals)
C:187, 8: Invalid variable name "db" (invalid-name)
C:207,16: Invalid variable name "pk" (invalid-name)
C:218,16: Invalid function name "getKey" (invalid-name)
C:218,16: Missing function docstring (missing-docstring)
R:186, 4: Too many branches (13/12) (too-many-branches)
C:235, 8: Invalid variable name "db" (invalid-name)
C:261, 8: Invalid variable name "db" (invalid-name)
C:323, 8: Invalid variable name "pk" (invalid-name)
C:329,16: Invalid variable name "n" (invalid-name)
C:331,16: Invalid variable name "pk" (invalid-name)
C:333,20: Invalid variable name "pk" (invalid-name)
R:333,20: Redefinition of pk type from dict to int (redefined-variable-type)
W:309,34: Unused argument 'tree' (unused-argument)
C:342, 4: Invalid argument name "pk" (invalid-name)
C:342, 4: Missing method docstring (missing-docstring)
C:343, 8: Invalid variable name "db" (invalid-name)
C:353,16: Invalid variable name "e" (invalid-name)
C:371,16: Invalid variable name "e" (invalid-name)
R:387, 4: Too many local variables (16/15) (too-many-locals)
C:388, 8: Invalid variable name "db" (invalid-name)
C:401,15: Invalid variable name "v" (invalid-name)
C:431, 8: Invalid variable name "db" (invalid-name)
C:434,12: Invalid variable name "db" (invalid-name)
C:446,12: Invalid variable name "f" (invalid-name)
C:446,15: Invalid variable name "v" (invalid-name)
C:460, 8: Invalid variable name "db" (invalid-name)
C:468,23: Invalid variable name "v" (invalid-name)
C:735, 8: Invalid variable name "p" (invalid-name)
C:750, 8: Invalid variable name "n" (invalid-name)
W:757,30: Unused argument 'tree' (unused-argument)
R:757, 4: Method could be a function (no-self-use)


Report
======
460 statements analysed.

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

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |1      |1          |=          |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |2      |2          |=          |50.00       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |51     |51         |=          |92.16       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |2      |2          |=          |0.00        |50.00    |
+---------+-------+-----------+-----------+------------+---------+



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

    etcdb (etcdb.cursor)
      \-sqlparser 
        \-parser (etcdb.cursor)



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

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |530    |68.83 |530      |=          |
+----------+-------+------+---------+-----------+
|docstring |107    |13.90 |107      |=          |
+----------+-------+------+---------+-----------+
|comment   |10     |1.30  |10       |=          |
+----------+-------+------+---------+-----------+
|empty     |123    |15.97 |123      |=          |
+----------+-------+------+---------+-----------+



Duplication
-----------

+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |0     |0        |=          |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |0.000    |=          |
+-------------------------+------+---------+-----------+



Messages by category
--------------------

+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |33     |33       |=          |
+-----------+-------+---------+-----------+
|refactor   |7      |7        |=          |
+-----------+-------+---------+-----------+
|warning    |6      |6        |=          |
+-----------+-------+---------+-----------+
|error      |1      |1        |=          |
+-----------+-------+---------+-----------+



Messages
--------

+-----------------------------+------------+
|message id                   |occurrences |
+=============================+============+
|invalid-name                 |24          |
+-----------------------------+------------+
|missing-docstring            |8           |
+-----------------------------+------------+
|unused-argument              |4           |
+-----------------------------+------------+
|too-many-locals              |2           |
+-----------------------------+------------+
|unused-variable              |1           |
+-----------------------------+------------+
|too-many-instance-attributes |1           |
+-----------------------------+------------+
|too-many-branches            |1           |
+-----------------------------+------------+
|too-few-public-methods       |1           |
+-----------------------------+------------+
|superfluous-parens           |1           |
+-----------------------------+------------+
|redefined-variable-type      |1           |
+-----------------------------+------------+
|no-self-use                  |1           |
+-----------------------------+------------+
|import-error                 |1           |
+-----------------------------+------------+
|fixme                        |1           |
+-----------------------------+------------+



Global evaluation
-----------------
Your code has been rated at 8.89/10 (previous run: 8.89/10, +0.00)


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions