Skip to content

Commit 2024c78

Browse files
refactor: Add __init__.py to shorten import path
1 parent b208ba5 commit 2024c78

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/pysc2_usage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ such as `no_op` or `Move_pt`.
1010
But in URNAI, due to encapsulation, the call is done in the following manner:
1111
`X[F].run()`. Where `X` is a dict containing classes for each of the action functions
1212
in PySC2, and `F` is a string with the name of the action function you are calling.
13-
The dictionaries mentioned above are stored in the file `sc2_actions.py`, and can
13+
The dictionaries mentioned above are stored in the `urnai/sc2/actions/sc2_actions.py`, and can
1414
be imported such as in the example below:
1515

1616
```python
17-
from urnai.sc2.actions.sc2_actions import raw_functions_classes as sc2_actions
17+
from urnai.sc2 import raw_functions_classes as sc2_actions
1818
```
1919

2020
### Examples

urnai/sc2/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from urnai.sc2.actions import sc2_actions
2+
3+
functions_classes = sc2_actions.functions_classes
4+
raw_functions_classes = sc2_actions.raw_functions_classes
5+
6+
__all__ = ['functions_classes', 'raw_functions_classes']

0 commit comments

Comments
 (0)