Closed epignatelli closed 1 year ago
************* Module navix.environments.environment navix/environments/environment.py:1:0: C0114: Missing module docstring (missing-module-docstring) navix/environments/environment.py:38:0: C0115: Missing class docstring (missing-class-docstring) navix/environments/environment.py:54:4: C0116: Missing function or method docstring (missing-function-docstring) navix/environments/environment.py:57:4: W0102: Dangerous default value ACTIONS (builtins.dict) as argument (dangerous-default-value) navix/environments/environment.py:71:4: C0116: Missing function or method docstring (missing-function-docstring) navix/environments/environment.py:71:4: W0102: Dangerous default value ACTIONS (builtins.dict) as argument (dangerous-default-value) navix/environments/environment.py:81:4: C0116: Missing function or method docstring (missing-function-docstring) navix/environments/environment.py:84:4: C0116: Missing function or method docstring (missing-function-docstring) navix/environments/environment.py:87:4: C0116: Missing function or method docstring (missing-function-docstring) navix/environments/environment.py:88:62: C0103: Argument name "t" doesn't conform to snake_case naming style (invalid-name) navix/environments/environment.py:32:0: W0611: Unused StepType imported from components (unused-import) ************* Module navix.environments.keydoor navix/environments/keydoor.py:1:0: C0114: Missing module docstring (missing-module-docstring) navix/environments/keydoor.py:9:0: C0115: Missing class docstring (missing-class-docstring) navix/environments/keydoor.py:10:4: R0914: Too many local variables (22/15) (too-many-locals) navix/environments/keydoor.py:11:13: C0103: Variable name "k1" doesn't conform to snake_case naming style (invalid-name) navix/environments/keydoor.py:11:17: C0103: Variable name "k2" doesn't conform to snake_case naming style (invalid-name) navix/environments/keydoor.py:11:21: C0103: Variable name "k3" doesn't conform to snake_case naming style (invalid-name) navix/environments/keydoor.py:11:25: C0103: Variable name "k4" doesn't conform to snake_case naming style (invalid-name) ************* Module navix.environments.room navix/environments/room.py:1:0: C0114: Missing module docstring (missing-module-docstring) navix/environments/room.py:32:0: C0115: Missing class docstring (missing-class-docstring) navix/environments/room.py:34:13: C0103: Variable name "k1" doesn't conform to snake_case naming style (invalid-name) navix/environments/room.py:34:17: C0103: Variable name "k2" doesn't conform to snake_case naming style (invalid-name) ************* Module navix.grid navix/grid.py:1:0: C0114: Missing module docstring (missing-module-docstring) navix/grid.py:80:0: C0116: Missing function or method docstring (missing-function-docstring) navix/grid.py:81:32: C0103: Argument name "n" doesn't conform to snake_case naming style (invalid-name) navix/grid.py:102:0: C0116: Missing function or method docstring (missing-function-docstring) navix/grid.py:102:37: C0103: Argument name "n" doesn't conform to snake_case naming style (invalid-name) navix/grid.py:106:0: C0116: Missing function or method docstring (missing-function-docstring) navix/grid.py:106:0: W0102: Dangerous default value {} as argument (dangerous-default-value) ************* Module tests.test_actions tests/test_actions.py:1:0: C0114: Missing module docstring (missing-module-docstring) tests/test_actions.py:7:0: C0116: Missing function or method docstring (missing-function-docstring) tests/test_actions.py:17:12: W0212: Access to a protected member _rotate of a client class (protected-access) tests/test_actions.py:22:12: W0212: Access to a protected member _rotate of a client class (protected-access) tests/test_actions.py:27:12: W0212: Access to a protected member _rotate of a client class (protected-access) tests/test_actions.py:32:12: W0212: Access to a protected member _rotate of a client class (protected-access) tests/test_actions.py:7:0: R1711: Useless return at end of function or method (useless-return) ************* Module tests.test_environments tests/test_environments.py:1:0: C0114: Missing module docstring (missing-module-docstring) tests/test_environments.py:6:0: C0116: Missing function or method docstring (missing-function-docstring) tests/test_environments.py:7:4: C0103: Function name "f" doesn't conform to snake_case naming style (invalid-name) tests/test_environments.py:36:0: C0116: Missing function or method docstring (missing-function-docstring) tests/test_environments.py:37:4: C0103: Function name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module tests.test_grid tests/test_grid.py:1:0: C0114: Missing module docstring (missing-module-docstring) tests/test_grid.py:7:0: C0116: Missing function or method docstring (missing-function-docstring) tests/test_grid.py:32:0: C0116: Missing function or method docstring (missing-function-docstring) tests/test_grid.py:53:0: C0116: Missing function or method docstring (missing-function-docstring) tests/test_grid.py:54:4: C0103: Function name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module tests.test_observations tests/test_observations.py:6:0: C0301: Line too long (104/100) (line-too-long) tests/test_observations.py:13:0: C0304: Final newline missing (missing-final-newline) tests/test_observations.py:1:0: C0114: Missing module docstring (missing-module-docstring) tests/test_observations.py:5:0: C0116: Missing function or method docstring (missing-function-docstring) ************* Module tests.test_tasks tests/test_tasks.py:1:0: C0114: Missing module docstring (missing-module-docstring) tests/test_tasks.py:5:0: C0116: Missing function or method docstring (missing-function-docstring) ************* Module tests.test_terminations tests/test_terminations.py:64:0: C0304: Final newline missing (missing-final-newline) tests/test_terminations.py:1:0: C0114: Missing module docstring (missing-module-docstring) tests/test_terminations.py:7:0: C0116: Missing function or method docstring (missing-function-docstring) tests/test_terminations.py:8:4: C0103: Function name "f" doesn't conform to snake_case naming style (invalid-name) tests/test_terminations.py:37:0: C0116: Missing function or method docstring (missing-function-docstring) tests/test_terminations.py:38:4: C0103: Function name "f" doesn't conform to snake_case naming style (invalid-name) tests/test_terminations.py:1:0: R0801: Similar lines in 2 files ==tests.test_environments:[13:21] ==tests.test_terminations:[16:24] actions = ( 0, # noop sanity check 2, # rotate_ccw 3, # forward 3, # forward 2, # rotate_ccw 3, # forward ) (duplicate-code) tests/test_terminations.py:1:0: R0801: Similar lines in 2 files ==tests.test_environments:[8:16] ==tests.test_terminations:[39:47] key = jax.random.PRNGKey(4) reset = jax.jit(env.reset) step = jax.jit(env.step) timestep = reset(key) # these are optimal actions for navigation + action_cost actions = ( 0, # noop sanity check 2, # rotate_ccw (duplicate-code) Report ====== 287 statements analysed. Statistics by type ------------------ +---------+-------+-----------+-----------+------------+---------+ |type |number |old number |difference |%documented |%badname | +=========+=======+===========+===========+============+=========+ |module |10 |NC |NC |0.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |class |3 |NC |NC |0.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |method |8 |NC |NC |37.50 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |function |25 |NC |NC |48.00 |20.00 | +---------+-------+-----------+-----------+------------+---------+ External dependencies --------------------- :: navix (tests.test_actions,tests.test_environments,tests.test_grid,tests.test_observations,tests.test_tasks,tests.test_terminations) \-actions (navix.environments.environment) \-components (navix.environments.environment,navix.environments.keydoor,navix.environments.room) \-grid (navix.environments.keydoor,navix.environments.room,tests.test_grid) \-observations (navix.environments.environment) \-tasks (navix.environments.environment) \-terminations (navix.environments.environment) 641 lines have been analyzed Raw metrics ----------- +----------+-------+------+---------+-----------+ |type |number |% |previous |difference | +==========+=======+======+=========+===========+ |code |440 |68.64 |NC |NC | +----------+-------+------+---------+-----------+ |docstring |7 |1.09 |NC |NC | +----------+-------+------+---------+-----------+ |comment |72 |11.23 |NC |NC | +----------+-------+------+---------+-----------+ |empty |122 |19.03 |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 |48 |NC |NC | +-----------+-------+---------+-----------+ |refactor |4 |NC |NC | +-----------+-------+---------+-----------+ |warning |8 |NC |NC | +-----------+-------+---------+-----------+ |error |0 |NC |NC | +-----------+-------+---------+-----------+ Messages -------- +---------------------------+------------+ |message id |occurrences | +===========================+============+ |missing-function-docstring |18 | +---------------------------+------------+ |invalid-name |14 | +---------------------------+------------+ |missing-module-docstring |10 | +---------------------------+------------+ |protected-access |4 | +---------------------------+------------+ |missing-class-docstring |3 | +---------------------------+------------+ |dangerous-default-value |3 | +---------------------------+------------+ |missing-final-newline |2 | +---------------------------+------------+ |duplicate-code |2 | +---------------------------+------------+ |useless-return |1 | +---------------------------+------------+ |unused-import |1 | +---------------------------+------------+ |too-many-locals |1 | +---------------------------+------------+ |line-too-long |1 | +---------------------------+------------+ ----------------------------------- Your code has been rated at 7.91/10