diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c00e514c3d..2c7489095f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 args: diff --git a/examples/bipedal_walk_fwddyn.py b/examples/bipedal_walk_fwddyn.py index 91f3da8ec2..0d79a17328 100644 --- a/examples/bipedal_walk_fwddyn.py +++ b/examples/bipedal_walk_fwddyn.py @@ -101,7 +101,7 @@ # Added the callback functions print("*** SOLVE " + key + " ***") - if WITHDISPLAY and type(display) == crocoddyl.GepettoDisplay: + if WITHDISPLAY and isinstance(crocoddyl.GepettoDisplay, type(display)): if WITHPLOT: solver[i].setCallbacks( [ diff --git a/examples/bipedal_walk_invdyn.py b/examples/bipedal_walk_invdyn.py index bf247a3830..a7929cabe9 100644 --- a/examples/bipedal_walk_invdyn.py +++ b/examples/bipedal_walk_invdyn.py @@ -101,7 +101,7 @@ # Added the callback functions print("*** SOLVE " + key + " ***") - if WITHDISPLAY and type(display) == crocoddyl.GepettoDisplay: + if WITHDISPLAY and isinstance(crocoddyl.GepettoDisplay, type(display)): if WITHPLOT: solver[i].setCallbacks( [ diff --git a/examples/bipedal_walk_ubound.py b/examples/bipedal_walk_ubound.py index 086674456f..77046fbe18 100644 --- a/examples/bipedal_walk_ubound.py +++ b/examples/bipedal_walk_ubound.py @@ -104,7 +104,7 @@ # Added the callback functions print("*** SOLVE " + key + " ***") - if WITHDISPLAY and type(display) == crocoddyl.GepettoDisplay: + if WITHDISPLAY and isinstance(crocoddyl.GepettoDisplay, type(display)): if WITHPLOT: solver[i].setCallbacks( [ diff --git a/examples/humanoid_manipulation.py b/examples/humanoid_manipulation.py index f20c6d648c..3881560cb1 100644 --- a/examples/humanoid_manipulation.py +++ b/examples/humanoid_manipulation.py @@ -164,7 +164,7 @@ # Creating the DDP solver for this OC problem, defining a logger solver = crocoddyl.SolverFDDP(problem) -if WITHDISPLAY and type(display) == crocoddyl.GepettoDisplay: +if WITHDISPLAY and isinstance(crocoddyl.GepettoDisplay, type(display)): display.rate = 4 display.freq = 4 if WITHPLOT: diff --git a/examples/humanoid_manipulation_ubound.py b/examples/humanoid_manipulation_ubound.py index 38a5887d66..d15150ca7e 100644 --- a/examples/humanoid_manipulation_ubound.py +++ b/examples/humanoid_manipulation_ubound.py @@ -166,7 +166,7 @@ # Creating the DDP solver for this OC problem, defining a logger solver = crocoddyl.SolverBoxFDDP(problem) -if WITHDISPLAY and type(display) == crocoddyl.GepettoDisplay: +if WITHDISPLAY and isinstance(crocoddyl.GepettoDisplay, type(display)): display.rate = 4 display.freq = 4 if WITHPLOT: diff --git a/examples/humanoid_taichi.py b/examples/humanoid_taichi.py index 04456e18da..3dae7b7ff4 100644 --- a/examples/humanoid_taichi.py +++ b/examples/humanoid_taichi.py @@ -213,7 +213,7 @@ # Creating the DDP solver for this OC problem, defining a logger solver = crocoddyl.SolverBoxFDDP(problem) -if WITHDISPLAY and type(display) == crocoddyl.GepettoDisplay: +if WITHDISPLAY and isinstance(crocoddyl.GepettoDisplay, type(display)): display.rate = 4 display.freq = 4 if WITHPLOT: diff --git a/examples/quadrupedal_gaits_fwddyn.py b/examples/quadrupedal_gaits_fwddyn.py index c587ca7bfc..29083782da 100644 --- a/examples/quadrupedal_gaits_fwddyn.py +++ b/examples/quadrupedal_gaits_fwddyn.py @@ -156,7 +156,7 @@ # Added the callback functions print("*** SOLVE " + key + " ***") - if WITHDISPLAY and type(display) == crocoddyl.GepettoDisplay: + if WITHDISPLAY and isinstance(crocoddyl.GepettoDisplay, type(display)): if WITHPLOT: solver[i].setCallbacks( [ diff --git a/examples/quadrupedal_gaits_invdyn.py b/examples/quadrupedal_gaits_invdyn.py index fae7623328..328ce4163b 100644 --- a/examples/quadrupedal_gaits_invdyn.py +++ b/examples/quadrupedal_gaits_invdyn.py @@ -158,7 +158,7 @@ # Added the callback functions print("*** SOLVE " + key + " ***") - if WITHDISPLAY and type(display) == crocoddyl.GepettoDisplay: + if WITHDISPLAY and isinstance(crocoddyl.GepettoDisplay, type(display)): if WITHPLOT: solver[i].setCallbacks( [