Skip to content

Commit dcd2e2b

Browse files
stephane-caronStéphane Caron
authored andcommitted
Update docstring format using ruff --fix
1 parent 78dad1f commit dcd2e2b

File tree

75 files changed

+82
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+82
-250
lines changed

robot_descriptions/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
Import open source robot description as Python modules.
20-
"""
18+
"""Import open source robot description as Python modules."""
2119

2220
__version__ = "1.4.0"

robot_descriptions/_cache.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
# See the License for the specific language governing permissions and
1717
# limitations under the License.
1818

19-
"""
20-
Git utility functions to clone model repositories.
21-
"""
19+
"""Git utility functions to clone model repositories."""
2220

2321
import os
2422
import shutil
@@ -36,15 +34,10 @@
3634

3735

3836
class CloneProgressBar(RemoteProgress):
39-
40-
"""
41-
Progress bar when cloning.
42-
"""
37+
"""Progress bar when cloning."""
4338

4439
def __init__(self):
45-
"""
46-
Initialize progress bar.
47-
"""
40+
"""Initialize progress bar."""
4841
super().__init__()
4942
self.progress = tqdm.tqdm()
5043

robot_descriptions/_command_line.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
List or show robot descriptions from the command line.
20-
"""
18+
"""List or show robot descriptions from the command line."""
2119

2220
import argparse
2321
from importlib import import_module # type: ignore
@@ -102,9 +100,7 @@ def get_argument_parser() -> argparse.ArgumentParser:
102100

103101

104102
def list_descriptions():
105-
"""
106-
List descriptions to the standard output.
107-
"""
103+
"""List descriptions to the standard output."""
108104
for name in sorted(list(DESCRIPTIONS)):
109105
desc = DESCRIPTIONS[name]
110106
formats = ("URDF" if desc.has_urdf else "") + (
@@ -186,9 +182,7 @@ def animate(name: str) -> None:
186182

187183

188184
def main(argv=None):
189-
"""
190-
Command line entry point.
191-
"""
185+
"""Command line entry point."""
192186
parser = get_argument_parser()
193187
args = parser.parse_args(argv)
194188
if args.subcmd == "list":

robot_descriptions/_descriptions.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,22 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
List of all robot descriptions.
20-
"""
18+
"""List of all robot descriptions."""
2119

2220
from dataclasses import dataclass
2321
from enum import IntEnum
2422
from typing import Dict, Set
2523

2624

2725
class Format(IntEnum):
28-
29-
"""
30-
Format of a robot description.
31-
"""
26+
"""Format of a robot description."""
3227

3328
URDF = 0
3429
MJCF = 1
3530

3631

3732
@dataclass
3833
class Description:
39-
4034
"""
4135
Metadata for a robot description.
4236
@@ -57,16 +51,12 @@ def __init__(self, single_format):
5751

5852
@property
5953
def has_mjcf(self) -> bool:
60-
"""
61-
Check if description provides MJCF.
62-
"""
54+
"""Check if description provides MJCF."""
6355
return Format.MJCF in self.formats
6456

6557
@property
6658
def has_urdf(self) -> bool:
67-
"""
68-
Check if description provides URDF.
69-
"""
59+
"""Check if description provides URDF."""
7060
return Format.URDF in self.formats
7161

7262

robot_descriptions/_empty_description.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,4 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
Empty description, used in unit tests.
20-
"""
18+
"""Empty description, used in unit tests."""

robot_descriptions/_repositories.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
Git utility functions to clone model repositories.
20-
"""
18+
"""Git utility functions to clone model repositories."""
2119

2220
from dataclasses import dataclass
2321
from typing import Dict
2422

2523

2624
@dataclass
2725
class Repository:
28-
2926
"""
3027
Remote git repository.
3128

robot_descriptions/a1_description.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
A1 description.
20-
"""
18+
"""A1 description."""
2119

2220
from os import getenv as _getenv
2321
from os import path as _path

robot_descriptions/a1_mj_description.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
A1 MJCF description.
20-
"""
18+
"""A1 MJCF description."""
2119

2220
from os import getenv as _getenv
2321
from os import path as _path

robot_descriptions/aliengo_description.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
Aliengo description.
20-
"""
18+
"""Aliengo description."""
2119

2220
from os import getenv as _getenv
2321
from os import path as _path

robot_descriptions/allegro_hand_description.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""
19-
Allegro Hand description.
20-
"""
18+
"""Allegro Hand description."""
2119

2220
from os import getenv as _getenv
2321
from os import path as _path

0 commit comments

Comments
 (0)