Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
nwiltsie committed Sep 27, 2024
1 parent 6c933bb commit dad4001
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bumpchanges/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections import defaultdict
from dataclasses import dataclass
from pathlib import Path
from typing import Union

import semver

Expand Down Expand Up @@ -39,7 +40,7 @@ def tag_to_semver(tag: str) -> semver.version.Version:
return semver.Version.parse(tag[1:])


def version_to_tag_str(version: str | semver.version.Version) -> str:
def version_to_tag_str(version: Union[str, semver.version.Version]) -> str:
"""Return the git tag associated with this version."""
# _Do_ add leading `v`s. Versions numbers never have leading `v`s, tags
# always have leading `v`s.
Expand Down
4 changes: 4 additions & 0 deletions tests/test_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def test_alias_workflow(aliaser):

def test_modified_releases(aliaser):
"""Test how new releases interact with the results."""
# pylint: disable=protected-access

assert aliaser.compute_alias_action(2) == ("v2", "v2.1.0")

# Act as if this GitHub release never existed
Expand Down Expand Up @@ -90,6 +92,8 @@ def test_modified_releases(aliaser):
@pytest.mark.parametrize("release_pre", [True, False])
def test_drafts_and_prereleases(aliaser, semver_pre, release_draft, release_pre):
"""Test that only non-drafts and full releases are eligible."""
# pylint: disable=protected-access

base_version = semver.Version(3, 0, 0)
if semver_pre:
base_version = base_version.bump_prerelease()
Expand Down

0 comments on commit dad4001

Please sign in to comment.