Skip to content

Commit bf7d64a

Browse files
pre-commit-ci[bot]AdilZouitine
authored andcommitted
[pre-commit.ci] pre-commit autoupdate (#871)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 093f8f9 commit bf7d64a

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repos:
3737
- id: trailing-whitespace
3838

3939
- repo: https://github.com/crate-ci/typos
40-
rev: v1.30.2
40+
rev: v1
4141
hooks:
4242
- id: typos
4343
args: [--force-exclude]
@@ -48,7 +48,7 @@ repos:
4848
- id: pyupgrade
4949

5050
- repo: https://github.com/astral-sh/ruff-pre-commit
51-
rev: v0.9.10
51+
rev: v0.11.4
5252
hooks:
5353
- id: ruff
5454
args: [--fix]
@@ -57,12 +57,12 @@ repos:
5757

5858
##### Security #####
5959
- repo: https://github.com/gitleaks/gitleaks
60-
rev: v8.24.0
60+
rev: v8.24.2
6161
hooks:
6262
- id: gitleaks
6363

6464
- repo: https://github.com/woodruffw/zizmor-pre-commit
65-
rev: v1.4.1
65+
rev: v1.5.2
6666
hooks:
6767
- id: zizmor
6868

lerobot/common/datasets/lerobot_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ def __init__(
10531053
super().__init__()
10541054
self.repo_ids = repo_ids
10551055
self.root = Path(root) if root else HF_LEROBOT_HOME
1056-
self.tolerances_s = tolerances_s if tolerances_s else {repo_id: 1e-4 for repo_id in repo_ids}
1056+
self.tolerances_s = tolerances_s if tolerances_s else dict.fromkeys(repo_ids, 0.0001)
10571057
# Construct the underlying datasets passing everything but `transform` and `delta_timestamps` which
10581058
# are handled by this class.
10591059
self._datasets = [

lerobot/common/datasets/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def load_episodes_stats(local_dir: Path) -> dict:
240240
def backward_compatible_episodes_stats(
241241
stats: dict[str, dict[str, np.ndarray]], episodes: list[int]
242242
) -> dict[str, dict[str, np.ndarray]]:
243-
return {ep_idx: stats for ep_idx in episodes}
243+
return dict.fromkeys(episodes, stats)
244244

245245

246246
def load_image_as_numpy(

lerobot/common/datasets/v2/convert_dataset_v1_to_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def convert_dataset(
481481

482482
# Tasks
483483
if single_task:
484-
tasks_by_episodes = {ep_idx: single_task for ep_idx in episode_indices}
484+
tasks_by_episodes = dict.fromkeys(episode_indices, single_task)
485485
dataset, tasks = add_task_index_by_episodes(dataset, tasks_by_episodes)
486486
tasks_by_episodes = {ep_idx: [task] for ep_idx, task in tasks_by_episodes.items()}
487487
elif tasks_path:

lerobot/common/utils/logging_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(
9595
initial_step: int = 0,
9696
accelerator: Callable = None,
9797
):
98-
self.__dict__.update({k: None for k in self.__keys__})
98+
self.__dict__.update(dict.fromkeys(self.__keys__))
9999
self._batch_size = batch_size
100100
self._num_frames = num_frames
101101
self._avg_samples_per_ep = num_frames / num_episodes

0 commit comments

Comments
 (0)