Skip to content

Commit bbdd748

Browse files
authored
redo for python 3.8 (#10)
* redo for python 3.8 * bump version * updates docs
1 parent 6f2a37e commit bbdd748

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
python-version:
15+
- '3.8'
1516
- '3.9'
1617
- '3.10'
1718
- '3.11'

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
python-version:
22+
- '3.8'
2223
- '3.9'
2324
- '3.10'
2425
- '3.11'

docs/core.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,18 @@ The `to_win32_path` function converts input paths to Windows-style paths. These
229229
functions work independently of the underlying runner operating system.
230230

231231
```python
232-
to_posix_path('\\foo\\bar') // => /foo/bar
233-
to_win32_path('/foo/bar') // => \foo\bar
232+
from pygithubactions import path
233+
234+
path.to_posix_path('\\foo\\bar') // => /foo/bar
235+
path.to_win32_path('/foo/bar') // => \foo\bar
234236
```
235237

236238
The `to_platform_path` function converts input paths to the expected value on the runner's operating system.
237239

238240
```python
239241
// On a Windows runner.
240-
to_platform_path('/foo/bar') // => \foo\bar
242+
path.to_platform_path('/foo/bar') // => \foo\bar
241243

242244
// On a Linux runner.
243-
to_platform_path('\\foo\\bar') // => /foo/bar
245+
path.to_platform_path('\\foo\\bar') // => /foo/bar
244246
```

pygithubactions/core/command.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from typing import Any, Optional
2+
from typing import Any, Dict, Optional
33

44
from pygithubactions.core.utils import to_command_value
55

@@ -20,7 +20,7 @@ class Command:
2020
def __init__(
2121
self,
2222
command: Optional[str],
23-
properties: Optional[dict[str, Any]],
23+
properties: Optional[Dict[str, Any]],
2424
message: Optional[str],
2525
) -> None:
2626
self.command = command or 'missing.command'
@@ -42,7 +42,7 @@ def __str__(self) -> str:
4242
return cmd_str
4343

4444

45-
def issue_command(command: str, props: dict[str, Any], message: str) -> None:
45+
def issue_command(command: str, props: Dict[str, Any], message: str) -> None:
4646
cmd = Command(command, props, message)
4747
print(cmd, end=os.linesep)
4848

pygithubactions/core/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from typing import Any, Callable, Optional
2+
from typing import Any, Callable, List, Optional
33

44
from pygithubactions.core.command import issue
55
from pygithubactions.core.command import issue_command
@@ -112,7 +112,7 @@ def get_boolean_input(
112112

113113
def get_multiline_input(
114114
name: str, required: bool = False, trim_whitespace: bool = True
115-
) -> list[str]:
115+
) -> List[str]:
116116
"""Gets the values of an multiline input. Each value is also trimmed.
117117
118118
Args:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[project]
22

33
name = "pygithubactions"
4-
version = "0.1.2"
4+
version = "0.1.3"
55
description = "Github actions core library implemented in python"
66
readme = "README.md"
7-
requires-python = ">=3.9"
7+
requires-python = ">=3.8"
88
keywords = ["pygithubactions"]
99

1010
authors = [

0 commit comments

Comments
 (0)