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 linter errors in etcdb/cursor.py #8

Open
akuzminsky opened this issue Feb 21, 2017 · 0 comments
Open

fix linter errors in etcdb/cursor.py #8

akuzminsky opened this issue Feb 21, 2017 · 0 comments

Comments

@akuzminsky
Copy link
Contributor

  • 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)


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

No branches or pull requests

1 participant