Commit ee127dd2 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

flake8

parent 0dca82c9
from . import wrap
from .wrap import Flags
from . import wrap # noqa
from .wrap import Flags # noqa
......@@ -11,6 +11,7 @@ def toFlags(arr):
warn("This function is deprecated. Please, use Flags directly.")
return Flags(arr)
class MetaTask6d(object):
name = ''
opPoint = ''
......
from dynamic_graph import plug
from dynamic_graph.sot.core import Flags
from dynamic_graph.sot.core.feature_generic import FeatureGeneric
from dynamic_graph.sot.core.gain_adaptive import GainAdaptive
from dynamic_graph.sot.core.matrix_util import matrixToTuple, vectorToTuple
from dynamic_graph.sot.core.meta_task_6d import toFlags # kept for backward compatibility
from dynamic_graph.sot.core.meta_task_6d import toFlags # noqa kept for backward compatibility
from dynamic_graph.sot.core.meta_tasks import setGain
from dynamic_graph.sot.core.task import Task
from numpy import identity, matrix, zeros
......@@ -67,7 +68,9 @@ class MetaTaskPosture(object):
MetaTaskPosture.nbDof = len(self.feature.errorIN.value)
qdes = zeros((MetaTaskPosture.nbDof, 1))
act = [ False, ] * MetaTaskPosture.nbDof
act = [
False,
] * MetaTaskPosture.nbDof
for limbName, jointValues in kwargs.items():
limbRange = self.postureRange[limbName]
for i in limbRange:
......
......@@ -4,8 +4,8 @@ from dynamic_graph import plug
from dynamic_graph.sot.core import Flags
from dynamic_graph.sot.core.feature_generic import FeatureGeneric
from dynamic_graph.sot.core.gain_adaptive import GainAdaptive
from dynamic_graph.sot.core.matrix_util import matrixToTuple, rpy2tr
from dynamic_graph.sot.core.meta_task_6d import toFlags # kept for backward compatibility
from dynamic_graph.sot.core.matrix_util import rpy2tr
from dynamic_graph.sot.core.meta_task_6d import toFlags # noqa kept for backward compatibility
class MetaTaskCom(object):
......
......@@ -2,7 +2,7 @@ from dynamic_graph import plug
from dynamic_graph.sot.core import Flags
from dynamic_graph.sot.core.feature_point6d_relative import FeaturePoint6dRelative
from dynamic_graph.sot.core.matrix_util import matrixToTuple
from dynamic_graph.sot.core.meta_task_6d import MetaTask6d, toFlags # kept for backward compatibility
from dynamic_graph.sot.core.meta_task_6d import MetaTask6d, toFlags # noqa kept for backward compatibility
from dynamic_graph.sot.core.meta_tasks import generic6dReference, setGain
from dynamic_graph.sot.core.op_point_modifier import OpPointModifier
......
......@@ -2,7 +2,6 @@
import unittest
import dynamic_graph as dgpy
import dynamic_graph.sot.core.integrator_euler as ie
......
......@@ -2,98 +2,99 @@
import unittest
class PythonImportTest(unittest.TestCase):
def test_math_small_entities(self):
try:
import dynamic_graph.sot.core.math_small_entities
import dynamic_graph.sot.core.math_small_entities # noqa
except ImportError as ie:
self.fail(str(ie))
def test_feature_position_relative(self):
try:
import dynamic_graph.sot.core.feature_position_relative
import dynamic_graph.sot.core.feature_position_relative # noqa
except ImportError as ie:
self.fail(str(ie))
def test_feature_position(self):
try:
import dynamic_graph.sot.core.feature_position
import dynamic_graph.sot.core.feature_position # noqa
except ImportError as ie:
self.fail(str(ie))
def test_matrix_util(self):
try:
import dynamic_graph.sot.core.matrix_util
import dynamic_graph.sot.core.matrix_util # noqa
except ImportError as ie:
self.fail(str(ie))
def test_meta_task_6d(self):
try:
import dynamic_graph.sot.core.meta_task_6d
import dynamic_graph.sot.core.meta_task_6d # noqa
except ImportError as ie:
self.fail(str(ie))
def test_meta_task_posture(self):
try:
import dynamic_graph.sot.core.meta_task_posture
import dynamic_graph.sot.core.meta_task_posture # noqa
except ImportError as ie:
self.fail(str(ie))
def test_meta_task_visual_point(self):
try:
import dynamic_graph.sot.core.meta_task_visual_point
import dynamic_graph.sot.core.meta_task_visual_point # noqa
except ImportError as ie:
self.fail(str(ie))
def test_meta_tasks_kine_relative(self):
try:
import dynamic_graph.sot.core.meta_tasks_kine_relative
import dynamic_graph.sot.core.meta_tasks_kine_relative # noqa
except ImportError as ie:
self.fail(str(ie))
def test_meta_tasks_kine(self):
try:
import dynamic_graph.sot.core.meta_tasks_kine
import dynamic_graph.sot.core.meta_tasks_kine # noqa
except ImportError as ie:
self.fail(str(ie))
def test_meta_tasks(self):
try:
import dynamic_graph.sot.core.meta_tasks
import dynamic_graph.sot.core.meta_tasks # noqa
except ImportError as ie:
self.fail(str(ie))
def test_attime(self):
try:
import dynamic_graph.sot.core.utils.attime
import dynamic_graph.sot.core.utils.attime # noqa
except ImportError as ie:
self.fail(str(ie))
def test_history(self):
try:
import dynamic_graph.sot.core.utils.history
import dynamic_graph.sot.core.utils.history # noqa
except ImportError as ie:
self.fail(str(ie))
@unittest.skip("Fail on 'import dynamic_graph.matlab'")
def test_thread_interruptible_loop(self):
try:
import dynamic_graph.sot.core.utils.thread_interruptible_loop
import dynamic_graph.sot.core.utils.thread_interruptible_loop # noqa
except ImportError as ie:
self.fail(str(ie))
def test_viewer_helper(self):
try:
import dynamic_graph.sot.core.utils.viewer_helper
import dynamic_graph.sot.core.utils.viewer_helper # noqa
except ImportError as ie:
self.fail(str(ie))
def test_viewer_loger(self):
try:
import dynamic_graph.sot.core.utils.viewer_loger
import dynamic_graph.sot.core.utils.viewer_loger # noqa
except ImportError as ie:
self.fail(str(ie))
if __name__ == '__main__':
unittest.main()
......@@ -3,6 +3,7 @@
import unittest
from dynamic_graph.sot.core.smooth_reach import SmoothReach
class SmoothReachTest(unittest.TestCase):
def test_smooth_reach(self):
sr = SmoothReach("banana")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment