Skip to content

Commit

Permalink
style: fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaiejj committed Apr 30, 2024
1 parent e3293a0 commit 2da6562
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
- id: debug-statements
- id: double-quote-string-fixer
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.1
rev: v0.4.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -38,7 +38,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.4.0
rev: 24.4.2
hooks:
- id: black-jupyter
- repo: https://github.com/asottile/pyupgrade
Expand Down
4 changes: 2 additions & 2 deletions omnisafe/common/offline/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __init__( # pylint: disable=too-many-branches
# Load data from local .npz file
try:
data = np.load(dataset_name)
except Exception as e: # noqa: BLE001
except Exception as e:
raise ValueError(f'Failed to load data from {dataset_name}') from e

else:
Expand Down Expand Up @@ -284,7 +284,7 @@ def __init__( # pylint: disable=too-many-branches, super-init-not-called
# Load data from local .npz file
try:
data = np.load(dataset_name)
except Exception as e: # noqa: BLE001
except Exception as e:
raise ValueError(f'Failed to load data from {dataset_name}') from e

else:
Expand Down
5 changes: 0 additions & 5 deletions omnisafe/envs/safety_isaac_gym_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ def reset(
"""Reset the environment."""
return self._env.reset()

@property
def max_episode_steps(self) -> int:
"""The max steps per episode."""
return self._env.env.spec.max_episode_steps

def set_seed(self, seed: int) -> None:
"""Set the seed for the environment.
Expand Down

0 comments on commit 2da6562

Please sign in to comment.