Skip to content

Commit

Permalink
[dartpy] Format code using isort
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Mar 13, 2024
1 parent 5f43592 commit a3b720d
Show file tree
Hide file tree
Showing 31 changed files with 63 additions and 51 deletions.
2 changes: 1 addition & 1 deletion python/examples/biped_stand/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
import dartpy as dart
import numpy as np


class InputHandler(dart.gui.osg.GUIEventHandler):
Expand Down
2 changes: 1 addition & 1 deletion python/examples/drag_and_drop/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
import dartpy as dart
import numpy as np


def main():
Expand Down
2 changes: 1 addition & 1 deletion python/examples/operational_space_control/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
import dartpy as dart
import numpy as np


class HelloWorldNode(dart.gui.osg.RealTimeWorldNode):
Expand Down
2 changes: 1 addition & 1 deletion python/examples/rigid_chain/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
import dartpy as dart
import numpy as np


class MyWorldNode(dart.gui.osg.RealTimeWorldNode):
Expand Down
2 changes: 1 addition & 1 deletion python/examples/rigid_cubes/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
import dartpy as dart
import numpy as np


class MyWorldNode(dart.gui.osg.RealTimeWorldNode):
Expand Down
3 changes: 2 additions & 1 deletion python/examples/rigid_loop/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import math
import numpy as np

import dartpy as dart
import numpy as np


class MyWorldNode(dart.gui.osg.RealTimeWorldNode):
Expand Down
5 changes: 3 additions & 2 deletions python/tests/integration/test_joint_force_torque.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pytest
import math
import numpy as np

import dartpy as dart
import numpy as np
import pytest


def read_world(uri: dart.common.Uri):
Expand Down
3 changes: 2 additions & 1 deletion python/tests/unit/collision/test_collision.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import platform
import pytest

import dartpy as dart
import numpy as np
import pytest


def collision_groups_tester(cd):
Expand Down
2 changes: 1 addition & 1 deletion python/tests/unit/common/test_logging.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
import dartpy as dart
import pytest


def test_basics():
Expand Down
2 changes: 1 addition & 1 deletion python/tests/unit/common/test_stopwatch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
import dartpy as dart
import pytest


def test_basics():
Expand Down
2 changes: 1 addition & 1 deletion python/tests/unit/common/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# This file is provided under the "BSD-style" License

import pytest
import dartpy as dart
import pytest


def test_case_conversions():
Expand Down
1 change: 1 addition & 0 deletions python/tests/unit/common/test_uri.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import platform

import pytest
from dartpy.common import Uri

Expand Down
3 changes: 2 additions & 1 deletion python/tests/unit/constraint/test_constraint.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import platform
import pytest

import dartpy as dart
import numpy as np
import pytest


def test_ball_joint_constraint():
Expand Down
2 changes: 1 addition & 1 deletion python/tests/unit/dynamics/test_aspect.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
import dartpy as dart
import pytest


def test_simple_frame():
Expand Down
5 changes: 3 additions & 2 deletions python/tests/unit/dynamics/test_body_node.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import platform
import pytest
import numpy as np

import dartpy as dart
import numpy as np
import pytest


def test_basic():
Expand Down
7 changes: 4 additions & 3 deletions python/tests/unit/dynamics/test_inertia.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import platform
import pytest
import math
import numpy as np
import platform

import dartpy as dart
import numpy as np
import pytest


def test_inertia_init():
Expand Down
7 changes: 4 additions & 3 deletions python/tests/unit/dynamics/test_inverse_kinematics.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import platform
import pytest
import math
import numpy as np
import platform

import dartpy as dart
import numpy as np
import pytest


def test_solve_for_free_joint():
Expand Down
5 changes: 3 additions & 2 deletions python/tests/unit/dynamics/test_joint.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import math
import pytest
import numpy as np

import dartpy as dart
import numpy as np
import pytest


def kinematics_tester(joint):
Expand Down
4 changes: 2 additions & 2 deletions python/tests/unit/dynamics/test_meta_skeleton.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import platform
import pytest
import dartpy as dart

import dartpy as dart
import pytest

# TODO(JS): Move this to integration category once created

Expand Down
5 changes: 3 additions & 2 deletions python/tests/unit/dynamics/test_simple_frame.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import platform
import pytest
import numpy as np

import dartpy as dart
import numpy as np
import pytest


def test_basic():
Expand Down
5 changes: 3 additions & 2 deletions python/tests/unit/dynamics/test_skeleton.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import platform
import pytest
import numpy as np

import dartpy as dart
import numpy as np
import pytest


def test_basic():
Expand Down
1 change: 1 addition & 0 deletions python/tests/unit/math/test_random.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import platform

import pytest
from dartpy.math import Random

Expand Down
3 changes: 2 additions & 1 deletion python/tests/unit/optimizer/test_optimizer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
import math

import dartpy as dart
import pytest


# Problem reference: http://ab-initio.mit.edu/wiki/index.php/NLopt_Tutorial
Expand Down
3 changes: 2 additions & 1 deletion python/tests/unit/simulation/test_world.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import platform
import pytest

import dartpy as dart
import pytest


def test_empty_world():
Expand Down
5 changes: 2 additions & 3 deletions python/tests/unit/utils/test_dart_loader.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import os
import platform

import pytest
import dartpy
import pytest
from dartpy.utils import DartLoader
import os

from tests.util import get_asset_path


Expand Down
5 changes: 2 additions & 3 deletions python/tests/unit/utils/test_mjcf_parser.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import os
import platform

import pytest
import dartpy as dart
import os

import pytest
from tests.util import get_asset_path


Expand Down
2 changes: 1 addition & 1 deletion python/tests/unit/utils/test_sdf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# This file is provided under the "BSD-style" License

import pytest
import dartpy as dart
import pytest


def test_read_world():
Expand Down
2 changes: 1 addition & 1 deletion python/tests/unit/utils/test_skel_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# This file is provided under the "BSD-style" License

import pytest
import dartpy as dart
import pytest


def test_read_world():
Expand Down
4 changes: 2 additions & 2 deletions python/tutorials/chain/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import math
import numpy as np
import dartpy as dart

import dartpy as dart
import numpy as np

default_height = 1.0 # m
default_width = 0.2 # m
Expand Down
4 changes: 2 additions & 2 deletions python/tutorials/chain/main_finished.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import math
import numpy as np
import dartpy as dart

import dartpy as dart
import numpy as np

default_height = 1.0 # m
default_width = 0.2 # m
Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import contextlib
import distutils.log
import glob
import os
import re
import sys
import platform
import re
import subprocess
import glob

import sys
from codecs import open # To use a consistent encoding
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from distutils.version import LooseVersion
import distutils.log

from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext

# Get the current directory path.
dart_root = os.path.abspath(os.path.dirname(__file__))
Expand Down

0 comments on commit a3b720d

Please sign in to comment.