Closed epignatelli closed 5 months ago
************* Module benchmarks.minigrid_ benchmarks/minigrid_.py:1:0: C0301: Line too long (103/100) (line-too-long) benchmarks/minigrid_.py:1:0: C0114: Missing module docstring (missing-module-docstring) benchmarks/minigrid_.py:15:0: R0402: Use 'from torch import nn' instead (consider-using-from-import) benchmarks/minigrid_.py:16:0: R0402: Use 'from torch import optim' instead (consider-using-from-import) benchmarks/minigrid_.py:23:0: C0115: Missing class docstring (missing-class-docstring) benchmarks/minigrid_.py:23:0: R0902: Too many instance attributes (26/7) (too-many-instance-attributes) benchmarks/minigrid_.py:82:0: C0116: Missing function or method docstring (missing-function-docstring) benchmarks/minigrid_.py:88:0: C0115: Missing class docstring (missing-class-docstring) benchmarks/minigrid_.py:98:4: C0116: Missing function or method docstring (missing-function-docstring) benchmarks/minigrid_.py:88:0: R0903: Too few public methods (1/2) (too-few-public-methods) benchmarks/minigrid_.py:102:0: C0115: Missing class docstring (missing-class-docstring) benchmarks/minigrid_.py:103:23: W0621: Redefining name 'encoder' from outer scope (line 181) (redefined-outer-name) benchmarks/minigrid_.py:103:43: W0621: Redefining name 'envs' from outer scope (line 166) (redefined-outer-name) benchmarks/minigrid_.py:111:4: C0116: Missing function or method docstring (missing-function-docstring) benchmarks/minigrid_.py:114:4: C0116: Missing function or method docstring (missing-function-docstring) benchmarks/minigrid_.py:114:38: W0621: Redefining name 'action' from outer scope (line 234) (redefined-outer-name) benchmarks/minigrid_.py:128:0: C0115: Missing class docstring (missing-class-docstring) benchmarks/minigrid_.py:138:4: C0116: Missing function or method docstring (missing-function-docstring) benchmarks/minigrid_.py:138:26: W0621: Redefining name 'obs' from outer scope (line 188) (redefined-outer-name) benchmarks/minigrid_.py:128:0: R0903: Too few public methods (1/2) (too-few-public-methods) benchmarks/minigrid_.py:211:4: C0103: Constant name "frames" doesn't conform to UPPER_CASE naming style (invalid-name) benchmarks/minigrid_.py:269:12: C0103: Constant name "lastgaelam" doesn't conform to UPPER_CASE naming style (invalid-name) ************* Module benchmarks.navix_ benchmarks/navix_.py:1:0: C0114: Missing module docstring (missing-module-docstring) benchmarks/navix_.py:18:0: C0115: Missing class docstring (missing-class-docstring) benchmarks/navix_.py:32:4: C0116: Missing function or method docstring (missing-function-docstring) benchmarks/navix_.py:32:4: C0103: Function name "FlattenObsWrapper" doesn't conform to snake_case naming style (invalid-name) benchmarks/navix_.py:32:26: W0621: Redefining name 'env' from outer scope (line 40) (redefined-outer-name) benchmarks/navix_.py:33:25: C3001: Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (unnecessary-lambda-assignment) benchmarks/navix_.py:6:0: C0412: Imports from package jax are not grouped (ungrouped-imports) ************* Module navix._version navix/_version.py:1:0: C0114: Missing module docstring (missing-module-docstring) ************* Module navix.agents.agent navix/agents/agent.py:55:0: C0301: Line too long (102/100) (line-too-long) navix/agents/agent.py:1:0: C0114: Missing module docstring (missing-module-docstring) navix/agents/agent.py:13:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/agent.py:13:0: R0903: Too few public methods (0/2) (too-few-public-methods) navix/agents/agent.py:21:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/agent.py:24:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/agent.py:27:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/agent.py:38:17: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation) navix/agents/agent.py:27:24: W0613: Unused argument 'inspectable' (unused-argument) navix/agents/agent.py:60:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/agent.py:64:53: W0640: Cell variable step defined in loop (cell-var-from-loop) navix/agents/agent.py:1:0: W0611: Unused dataclass imported from dataclasses (unused-import) ************* Module navix.agents.models navix/agents/models.py:1:0: C0114: Missing module docstring (missing-module-docstring) navix/agents/models.py:11:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/models.py:11:0: R0903: Too few public methods (1/2) (too-few-public-methods) navix/agents/models.py:26:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/models.py:26:0: R0903: Too few public methods (1/2) (too-few-public-methods) navix/agents/models.py:46:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/models.py:51:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/models.py:75:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/models.py:78:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/models.py:52:8: W0201: Attribute 'actor' defined outside __init__ (attribute-defined-outside-init) navix/agents/models.py:64:8: W0201: Attribute 'critic' defined outside __init__ (attribute-defined-outside-init) navix/agents/models.py:1:0: W0611: Unused partial imported from functools (unused-import) navix/agents/models.py:2:0: W0611: Unused Callable imported from typing (unused-import) navix/agents/models.py:2:0: W0611: Unused Sequence imported from typing (unused-import) navix/agents/models.py:4:0: W0611: Unused import jax (unused-import) ************* Module navix.agents.ppo navix/agents/ppo.py:1:0: C0114: Missing module docstring (missing-module-docstring) navix/agents/ppo.py:28:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/ppo.py:28:0: R0903: Too few public methods (0/2) (too-few-public-methods) navix/agents/ppo.py:59:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/ppo.py:59:0: R0903: Too few public methods (0/2) (too-few-public-methods) navix/agents/ppo.py:70:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/ppo.py:70:0: R0903: Too few public methods (0/2) (too-few-public-methods) navix/agents/ppo.py:81:0: C0115: Missing class docstring (missing-class-docstring) navix/agents/ppo.py:86:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/ppo.py:127:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/ppo.py:150:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/ppo.py:150:4: R0913: Too many arguments (6/5) (too-many-arguments) navix/agents/ppo.py:150:4: R0914: Too many local variables (22/15) (too-many-locals) navix/agents/ppo.py:214:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/ppo.py:227:4: C0116: Missing function or method docstring (missing-function-docstring) navix/agents/ppo.py:227:4: R0914: Too many local variables (17/15) (too-many-locals) navix/agents/ppo.py:256:37: W0640: Cell variable n_samples defined in loop (cell-var-from-loop) navix/agents/ppo.py:259:38: W0640: Cell variable permutation defined in loop (cell-var-from-loop) navix/agents/ppo.py:275:28: W0108: Lambda may not be necessary (unnecessary-lambda) ************* Module navix.experiment navix/experiment.py:1:0: C0114: Missing module docstring (missing-module-docstring) navix/experiment.py:14:0: C0115: Missing class docstring (missing-class-docstring) navix/experiment.py:15:4: R0913: Too many arguments (7/5) (too-many-arguments) navix/experiment.py:31:4: C0116: Missing function or method docstring (missing-function-docstring) navix/experiment.py:56:47: W0640: Cell variable seed defined in loop (cell-var-from-loop) navix/experiment.py:74:4: C0116: Missing function or method docstring (missing-function-docstring) navix/experiment.py:74:4: R0914: Too many local variables (25/15) (too-many-locals) navix/experiment.py:79:53: W0640: Cell variable k defined in loop (cell-var-from-loop) navix/experiment.py:83:20: C0121: Comparison 'member[0].metadata['pytree_node'] == False' should be 'member[0].metadata['pytree_node'] is False' if checking for the singleton value False, or 'not member[0].metadata['pytree_node']' if testing for falsiness (singleton-comparison) navix/experiment.py:128:47: W0640: Cell variable i defined in loop (cell-var-from-loop) navix/experiment.py:131:52: W0640: Cell variable i defined in loop (cell-var-from-loop) Report ====== 633 statements analysed. Statistics by type ------------------ +---------+-------+-----------+-----------+------------+---------+ |type |number |old number |difference |%documented |%badname | +=========+=======+===========+===========+============+=========+ |module |7 |NC |NC |0.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |class |15 |NC |NC |0.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |method |25 |NC |NC |32.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |function |5 |NC |NC |60.00 |20.00 | +---------+-------+-----------+-----------+------------+---------+ External dependencies --------------------- :: navix (benchmarks.navix_) \-agents (benchmarks.navix_) \-environments (navix.agents.ppo) | \-environment (benchmarks.navix_,navix.agents.ppo) \-observations (benchmarks.navix_,navix.agents.ppo) \-states (navix.agents.ppo) 1136 lines have been analyzed Raw metrics ----------- +----------+-------+------+---------+-----------+ |type |number |% |previous |difference | +==========+=======+======+=========+===========+ |code |872 |76.76 |NC |NC | +----------+-------+------+---------+-----------+ |docstring |51 |4.49 |NC |NC | +----------+-------+------+---------+-----------+ |comment |67 |5.90 |NC |NC | +----------+-------+------+---------+-----------+ |empty |146 |12.85 |NC |NC | +----------+-------+------+---------+-----------+ Duplication ----------- +-------------------------+------+---------+-----------+ | |now |previous |difference | +=========================+======+=========+===========+ |nb duplicated lines |0 |NC |NC | +-------------------------+------+---------+-----------+ |percent duplicated lines |0.000 |NC |NC | +-------------------------+------+---------+-----------+ Messages by category -------------------- +-----------+-------+---------+-----------+ |type |number |previous |difference | +===========+=======+=========+===========+ |convention |49 |NC |NC | +-----------+-------+---------+-----------+ |refactor |16 |NC |NC | +-----------+-------+---------+-----------+ |warning |22 |NC |NC | +-----------+-------+---------+-----------+ |error |0 |NC |NC | +-----------+-------+---------+-----------+ % errors / warnings by module ----------------------------- +---------------------+------+--------+---------+-----------+ |module |error |warning |refactor |convention | +=====================+======+========+=========+===========+ |navix.agents.models |0.00 |27.27 |12.50 |14.29 | +---------------------+------+--------+---------+-----------+ |benchmarks.minigrid_ |0.00 |18.18 |31.25 |26.53 | +---------------------+------+--------+---------+-----------+ |navix.experiment |0.00 |18.18 |12.50 |10.20 | +---------------------+------+--------+---------+-----------+ |navix.agents.agent |0.00 |18.18 |6.25 |14.29 | +---------------------+------+--------+---------+-----------+ |navix.agents.ppo |0.00 |13.64 |37.50 |20.41 | +---------------------+------+--------+---------+-----------+ |benchmarks.navix_ |0.00 |4.55 |0.00 |12.24 | +---------------------+------+--------+---------+-----------+ |navix._version |0.00 |0.00 |0.00 |2.04 | +---------------------+------+--------+---------+-----------+ Messages -------- +-------------------------------+------------+ |message id |occurrences | +===============================+============+ |missing-function-docstring |19 | +-------------------------------+------------+ |missing-class-docstring |15 | +-------------------------------+------------+ |too-few-public-methods |8 | +-------------------------------+------------+ |missing-module-docstring |7 | +-------------------------------+------------+ |cell-var-from-loop |7 | +-------------------------------+------------+ |unused-import |5 | +-------------------------------+------------+ |redefined-outer-name |5 | +-------------------------------+------------+ |too-many-locals |3 | +-------------------------------+------------+ |invalid-name |3 | +-------------------------------+------------+ |too-many-arguments |2 | +-------------------------------+------------+ |line-too-long |2 | +-------------------------------+------------+ |consider-using-from-import |2 | +-------------------------------+------------+ |attribute-defined-outside-init |2 | +-------------------------------+------------+ |unused-argument |1 | +-------------------------------+------------+ |unnecessary-lambda-assignment |1 | +-------------------------------+------------+ |unnecessary-lambda |1 | +-------------------------------+------------+ |ungrouped-imports |1 | +-------------------------------+------------+ |too-many-instance-attributes |1 | +-------------------------------+------------+ |singleton-comparison |1 | +-------------------------------+------------+ |f-string-without-interpolation |1 | +-------------------------------+------------+ ----------------------------------- Your code has been rated at 8.63/10