Skip to content

Commit

Permalink
Updating linter and rerunning
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico-PizarroBejarano committed Oct 4, 2023
1 parent 8631e7f commit 39659bf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repos:
name: isort

- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.2
rev: v2.0.4
hooks:
- id: autopep8
name: autopep8-default
Expand All @@ -43,7 +43,7 @@ repos:
files: (^tests/|^safe_control_gym/math_and_models/transformations.py)

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
name: flake8_default
Expand Down
2 changes: 1 addition & 1 deletion safe_control_gym/controllers/mpc/mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def remove_constraints(self,
'''
old_constraints_list = self.constraints.constraints
for constraint in constraints:
assert constraint in self.constraints.constraints,\
assert constraint in self.constraints.constraints, \
ValueError('This constraint is not in the current list of constraints')
old_constraints_list.remove(constraint)
self.constraints, self.state_constraints_sym, self.input_constraints_sym = reset_constraints(old_constraints_list)
Expand Down
6 changes: 3 additions & 3 deletions safe_control_gym/envs/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,13 @@ def __init__(self,
upper_bounds = default_constraint_space.high
else:
upper_bounds = np.array(upper_bounds, ndmin=1)
assert len(upper_bounds) == default_constraint_space.shape[0],\
assert len(upper_bounds) == default_constraint_space.shape[0], \
ValueError('[ERROR]: Upper bound must have length equal to space dimension.')
if lower_bounds is None:
lower_bounds = default_constraint_space.low
else:
lower_bounds = np.array(lower_bounds, ndmin=1)
assert len(lower_bounds) == default_constraint_space.shape[0],\
assert len(lower_bounds) == default_constraint_space.shape[0], \
ValueError('[ERROR]: Lower bound must have length equal to space dimension.')
super().__init__(env,
lower_bounds=lower_bounds.astype(np.float64),
Expand Down Expand Up @@ -656,7 +656,7 @@ def create_constraint_list(constraint_specs, available_constraints, env):
constraint_list = []
for constraint in constraint_specs:
assert isinstance(constraint, dict), '[ERROR]: Each constraint must be specified as a dict.'
assert 'constraint_form' in constraint.keys(),\
assert 'constraint_form' in constraint.keys(), \
'[ERROR]: Each constraint must have a key \'constraint_form\''
con_form = constraint['constraint_form']
assert con_form in available_constraints, '[ERROR]. constraint not in list of available constraints'
Expand Down
2 changes: 1 addition & 1 deletion safe_control_gym/envs/gym_pybullet_drones/base_aviary.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __init__(self,
self.J_INV, \
self.KF, \
self.KM, \
self.COLLISION_H,\
self.COLLISION_H, \
self.COLLISION_R, \
self.COLLISION_Z_OFFSET, \
self.MAX_SPEED_KMH, \
Expand Down

0 comments on commit 39659bf

Please sign in to comment.