8000 CI: Update GH Actions by tomschr · Pull Request #366 · python-semver/python-semver · GitHub
[go: up one dir, main page]

Skip to content

CI: Update GH Actions #366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Output env variables
run: |
echo "Default branch=${default-branch}"
Expand All @@ -32,7 +32,7 @@ jobs:
echo "\n"
echo "::debug::---end"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.7
- name: Install dependencies
Expand All @@ -49,14 +49,19 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11.0-rc.2",
python-version: ["3.6",
"3.7",
"3.8",
"3.9",
"3.10",
"3.11",
# "3.12"
]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions src/semver/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"""
import os.path
import sys
from typing import List
from typing import List, Optional

from semver import cli


def main(cliargs: List[str] = None) -> int:
def main(cliargs: Optional[List[str]] = None) -> int:
if __package__ == "":
path = os.path.dirname(os.path.dirname(__file__))
sys.path[0:0] = [path]
Expand Down
8 changes: 4 additions & 4 deletions src/semver/_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
import warnings
from functools import partial, wraps
from types import FrameType
from typing import Type, Callable, cast
from typing import Type, Callable, Optional, cast

from . import cli
from .version import Version
from ._types import Decorator, F, String


def deprecated(
func: F = None,
replace: str = None,
version: str = None,
func: Optional[F] = None,
replace: Optional[str] = None,
version: Optional[str] = None,
category: Type[Warning] = DeprecationWarning,
) -> Decorator:
"""
Expand Down
4 changes: 2 additions & 2 deletions src/semver/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import argparse
import sys
from typing import cast, List
from typing import cast, List, Optional

from .version import Version
from .__about__ import __version__
Expand Down Expand Up @@ -152,7 +152,7 @@ def process(args: argparse.Namespace) -> str:
return args.func(args)


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

Expand Down
4 changes: 2 additions & 2 deletions src/semver/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def __init__(
major: SupportsInt,
minor: SupportsInt = 0,
patch: SupportsInt = 0,
prerelease: Union[String, int] = None,
build: Union[String, int] = None,
prerelease: Optional[Union[String, int]] = None,
build: Optional[Union[String, int]] = None,
):
# Build a dictionary of the arguments except prerelease and build
version_parts = {"major": int(major), "minor": int(minor), "patch": int(patch)}
Expand Down
0