Skip to content

Commit 2a3d18d

Browse files
authored
Merge pull request #366 from tomschr/gha-update
CI: Update GH Actions
2 parents c83c562 + 98e845c commit 2a3d18d

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

.github/workflows/python-testing.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
check:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v3
1515
- name: Output env variables
1616
run: |
1717
echo "Default branch=${default-branch}"
@@ -32,7 +32,7 @@ jobs:
3232
echo "\n"
3333
echo "::debug::---end"
3434
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v2
35+
uses: actions/setup-python@v3
3636
with:
3737
python-version: 3.7
3838
- name: Install dependencies
@@ -49,14 +49,19 @@ jobs:
4949
strategy:
5050
max-parallel: 5
5151
matrix:
52-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11.0-rc.2",
52+
python-version: ["3.6",
53+
"3.7",
54+
"3.8",
55+
"3.9",
56+
"3.10",
57+
"3.11",
5358
# "3.12"
5459
]
5560

5661
steps:
57-
- uses: actions/checkout@v1
62+
- uses: actions/checkout@v3
5863
- name: Set up Python ${{ matrix.python-version }}
59-
uses: actions/setup-python@v2
64+
uses: actions/setup-python@v3
6065
with:
6166
python-version: ${{ matrix.python-version }}
6267
- name: Install dependencies

src/semver/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
"""
1212
import os.path
1313
import sys
14-
from typing import List
14+
from typing import List, Optional
1515

1616
from semver import cli
1717

1818

19-
def main(cliargs: List[str] = None) -> int:
19+
def main(cliargs: Optional[List[str]] = None) -> int:
2020
if __package__ == "":
2121
path = os.path.dirname(os.path.dirname(__file__))
2222
sys.path[0:0] = [path]

src/semver/_deprecated.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
import warnings
88
from functools import partial, wraps
99
from types import FrameType
10-
from typing import Type, Callable, cast
10+
from typing import Type, Callable, Optional, cast
1111

1212
from . import cli
1313
from .version import Version
1414
from ._types import Decorator, F, String
1515

1616

1717
def deprecated(
18-
func: F = None,
19-
replace: str = None,
20-
version: str = None,
18+
func: Optional[F] = None,
19+
replace: Optional[str] = None,
20+
version: Optional[str] = None,
2121
category: Type[Warning] = DeprecationWarning,
2222
) -> Decorator:
2323
"""

src/semver/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import argparse
1414
import sys
15-
from typing import cast, List
15+
from typing import cast, List, Optional
1616

1717
from .version import Version
1818
from .__about__ import __version__
@@ -152,7 +152,7 @@ def process(args: argparse.Namespace) -> str:
152152
return args.func(args)
153153

154154

155-
def main(cliargs: List[str] = None) -> int:
155+
def main(cliargs: Optional[List[str]] = None) -> int:
156156
"""
157157
Entry point for the application script.
158158

src/semver/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ def __init__(
107107
major: SupportsInt,
108108
minor: SupportsInt = 0,
109109
patch: SupportsInt = 0,
110-
prerelease: Union[String, int] = None,
111-
build: Union[String, int] = None,
110+
prerelease: Optional[Union[String, int]] = None,
111+
build: Optional[Union[String, int]] = None,
112112
):
113113
# Build a dictionary of the arguments except prerelease and build
114114
version_parts = {"major": int(major), "minor": int(minor), "patch": int(patch)}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy