Skip to content

Commit 0d49bc1

Browse files
committed
refactor(pre-commit): ran ruff pre-commit on entire repository
1 parent ab8ad27 commit 0d49bc1

File tree

24 files changed

+119
-137
lines changed

24 files changed

+119
-137
lines changed

docs/example.ipynb

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
11
{
2-
"cells": [
3-
{
4-
"cell_type": "markdown",
5-
"metadata": {},
6-
"source": [
7-
"# Example usage\n",
8-
"\n",
9-
"To use `sc2_datasets` in a project:"
10-
]
11-
},
12-
{
13-
"cell_type": "code",
14-
"execution_count": 2,
15-
"metadata": {},
16-
"outputs": [
17-
{
18-
"name": "stderr",
19-
"output_type": "stream",
20-
"text": [
21-
"Extracting unpack: 100%|██████████| 1/1 [00:00<00:00, 200.00it/s]\n",
22-
"Extracting 2022_TestReplaypack: 100%|██████████| 1/1 [00:00<00:00, 333.36it/s]\n"
23-
]
24-
}
25-
],
26-
"source": [
27-
"from sc2_datasets.torch.sc2_egset_dataset import SC2EGSetDataset\n",
28-
"from sc2_datasets.available_replaypacks import EXAMPLE_SYNTHETIC_REPLAYPACKS\n",
29-
"\n",
30-
"# Initialize the dataset:\n",
31-
"sc2_egset_dataset = SC2EGSetDataset(\n",
32-
" unpack_dir=\"../tests/test_output/unpack\", # Specify existing directory path, where the data will be unpacked.\n",
33-
" download_dir=\"../tests/test_output/download\", # Specify existing directory path, where the data will be downloaded.\n",
34-
" download=True,\n",
35-
" names_urls=EXAMPLE_SYNTHETIC_REPLAYPACKS, # Use a synthetic replaypack containing 1 replay.\n",
36-
")\n",
37-
"\n",
38-
"# Iterate over instances:\n",
39-
"for i in range(len(sc2_egset_dataset)):\n",
40-
" sc2_egset_dataset[i]"
41-
]
42-
}
43-
],
44-
"metadata": {
45-
"kernelspec": {
46-
"display_name": "Python 3.10.0 ('venv': venv)",
47-
"language": "python",
48-
"name": "python3"
49-
},
50-
"language_info": {
51-
"codemirror_mode": {
52-
"name": "ipython",
53-
"version": 3
54-
},
55-
"file_extension": ".py",
56-
"mimetype": "text/x-python",
57-
"name": "python",
58-
"nbconvert_exporter": "python",
59-
"pygments_lexer": "ipython3",
60-
"version": "3.10.0"
61-
},
62-
"vscode": {
63-
"interpreter": {
64-
"hash": "ddabeebea1640b0163a92815eef996f97fed6bbf3bb1d5b76776c493c09f748f"
65-
}
66-
}
67-
},
68-
"nbformat": 4,
69-
"nbformat_minor": 4
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Example usage\n",
8+
"\n",
9+
"To use `sc2_datasets` in a project:"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": 2,
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"name": "stderr",
19+
"output_type": "stream",
20+
"text": [
21+
"Extracting unpack: 100%|██████████| 1/1 [00:00<00:00, 200.00it/s]\n",
22+
"Extracting 2022_TestReplaypack: 100%|██████████| 1/1 [00:00<00:00, 333.36it/s]\n"
23+
]
24+
}
25+
],
26+
"source": [
27+
"from sc2_datasets.torch.sc2_egset_dataset import SC2EGSetDataset\n",
28+
"from sc2_datasets.available_replaypacks import EXAMPLE_SYNTHETIC_REPLAYPACKS\n",
29+
"\n",
30+
"# Initialize the dataset:\n",
31+
"sc2_egset_dataset = SC2EGSetDataset(\n",
32+
" unpack_dir=\"../tests/test_output/unpack\", # Specify existing directory path, where the data will be unpacked.\n",
33+
" download_dir=\"../tests/test_output/download\", # Specify existing directory path, where the data will be downloaded.\n",
34+
" download=True,\n",
35+
" names_urls=EXAMPLE_SYNTHETIC_REPLAYPACKS, # Use a synthetic replaypack containing 1 replay.\n",
36+
")\n",
37+
"\n",
38+
"# Iterate over instances:\n",
39+
"for i in range(len(sc2_egset_dataset)):\n",
40+
" sc2_egset_dataset[i]"
41+
]
42+
}
43+
],
44+
"metadata": {
45+
"kernelspec": {
46+
"display_name": "Python 3.10.0 ('venv': venv)",
47+
"language": "python",
48+
"name": "python3"
49+
},
50+
"language_info": {
51+
"codemirror_mode": {
52+
"name": "ipython",
53+
"version": 3
54+
},
55+
"file_extension": ".py",
56+
"mimetype": "text/x-python",
57+
"name": "python",
58+
"nbconvert_exporter": "python",
59+
"pygments_lexer": "ipython3",
60+
"version": "3.10.0"
61+
},
62+
"vscode": {
63+
"interpreter": {
64+
"hash": "ddabeebea1640b0163a92815eef996f97fed6bbf3bb1d5b76776c493c09f748f"
65+
}
66+
}
67+
},
68+
"nbformat": 4,
69+
"nbformat_minor": 4
7070
}

src/sc2_datasets/available_replaypacks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Module with global variables specifying collections of available replaypacks.
2+
Module with global variables specifying collections of available replaypacks.
33
"""
44

55
EXAMPLE_SYNTHETIC_REPLAYPACKS = [

src/sc2_datasets/lightning/datamodules/sc2_datamodule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99

1010
class SC2DataModule(pl.LightningDataModule):
11-
1211
"""
1312
Defines a LightningDataModule abstraction for some StarCraft II DataModule.
1413

src/sc2_datasets/lightning/datamodules/sc2_replaypack_datamodule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99

1010
class SC2ReplaypackDataModule(pl.LightningDataModule):
11-
1211
"""
1312
Defines a LightningDataModule abstraction for a single StarCraft II replaypack.
1413

src/sc2_datasets/replay_data/sc2_replay_data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626

2727
class SC2ReplayData:
28-
2928
"""
3029
Specifies a data type that holds information parsed from json representation of a replay.
3130

src/sc2_datasets/replay_parser/game_events/events/nested/delta.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class AddSubgroups(GameEvent):
8-
98
"""
109
AddSubgroups is a data type holding information about some subgroup change.
1110
The exact meaning or context of its attributes remains unclear.
@@ -48,7 +47,6 @@ def __init__(
4847

4948

5049
class Delta(GameEvent):
51-
5250
"""
5351
Most likely specifies a change in which units belong to some subgroups.
5452
The exact definition of this data type remains unclear.

src/sc2_datasets/replay_parser/game_events/events/nested/target_3d.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class Target3D:
2-
32
"""
43
Data type holding information about a 3D target point in space.
54

src/sc2_datasets/replay_parser/game_events/events/nested/target_unit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
class TargetUnit:
5-
65
"""
76
Specifies information about a targeted unit, although the precise meaning of this data type isn't verified.
87

src/sc2_datasets/replay_parser/init_data/init_data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class InitData:
7-
87
"""
98
Data type representing initialization data for a StarCraft II game.
109

src/sc2_datasets/replay_parser/message_events/events/chat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Chat(MessageEvent):
7-
87
"""
98
Chat holds information about messages exchanged between players during the game.
109

0 commit comments

Comments
 (0)