From 0e7102b33be0249e7f3f91dfde555e46f38d509a Mon Sep 17 00:00:00 2001 From: Giacomo Spigler <spiglerg@gmail.com> Date: Sun, 21 Apr 2019 17:40:07 +0200 Subject: [PATCH] fixed pulint errors --- flatland/core/transition_map.py | 7 +++++-- flatland/envs/rail_env.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/flatland/core/transition_map.py b/flatland/core/transition_map.py index 6e37a1c9..78dd9110 100644 --- a/flatland/core/transition_map.py +++ b/flatland/core/transition_map.py @@ -268,7 +268,8 @@ class GridTransitionMap(TransitionMap): override_gridsize : bool If override_gridsize=True, the width and height of the GridTransitionMap object are replaced with the size of the map loaded from `filename'. If override_gridsize=False, the transitions grid is either cropped (if - the grid size is larger than (height,width) ) or padded with zeros (if the grid size is smaller than (height,width) ) + the grid size is larger than (height,width) ) or padded with zeros (if the grid size is smaller than + (height,width) ) """ new_grid = np.load(filename) @@ -287,7 +288,9 @@ class GridTransitionMap(TransitionMap): elif new_grid.dtype == np.uint64: self.grid = np.zeros((self.height, self.width), dtype=np.uint64) - self.grid[0:min(self.height, new_height), 0:min(self.width, new_width)] = new_grid[0:min(self.height, new_height), 0:min(self.width, new_width)] + self.grid[0:min(self.height, new_height), + 0:min(self.width, new_width)] = new_grid[0:min(self.height, new_height), + 0:min(self.width, new_width)] # TODO: GIACOMO: is it better to provide those methods with lists of cell_ids # (most general implementation) or to make Grid-class specific methods for diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py index 06b544e3..a875304a 100644 --- a/flatland/envs/rail_env.py +++ b/flatland/envs/rail_env.py @@ -10,7 +10,7 @@ import numpy as np from flatland.core.env import Environment from flatland.core.env_observation_builder import TreeObsForRailEnv -from flatland.core.transitions import Grid4Transitions, Grid8Transitions, RailEnvTransitions +from flatland.core.transitions import Grid8Transitions, RailEnvTransitions from flatland.core.transition_map import GridTransitionMap -- GitLab