Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
budzianowski committed May 8, 2024
1 parent 91cb876 commit 6ab115a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions kol/formats/mjcf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mypy: disable-error-code="attr-defined"
# mypy: disable-error-code="operator,union-attr"
"""Defines common types and functions for exporting MJCF files.
API reference:
Expand Down Expand Up @@ -192,12 +192,21 @@ def _remove_stl_files(source_directory: str | Path) -> None:


class Robot:
"""A class to adapt the world in a Mujoco XML file."""

def __init__(self, robot_name: str, output_dir: str | Path, compiler: Compiler | None = None) -> None:
"""Initialize the robot.
Args:
robot_name (str): The name of the robot.
output_dir (str | Path): The output directory.
compiler (Compiler, optional): The compiler settings. Defaults to None.
"""
self.robot_name = robot_name
self.output_dir = output_dir
self.compiler = compiler
self._set_clean_up()
self.tree = ET.parse(output_dir / f"{robot_name}.xml")
self.tree = ET.parse(self.output_dir / f"{self.robot_name}.xml")

def _set_clean_up(self) -> None:
# HACK
Expand Down

0 comments on commit 6ab115a

Please sign in to comment.