Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: ruff fixes and remove / reflow commented code#958

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall 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
9 changes: 5 additions & 4 deletionstests/fixtures/git_repo.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@
)

if TYPE_CHECKING:
from typing import Generator,Literal,Protocol, TypedDict, Union
from typing import Generator, Protocol, TypedDict, Union

from semantic_release.hvcs import HvcsBase

Expand All@@ -34,7 +34,7 @@
UseParserFn,
)

CommitConvention =Literal["angular", "emoji", "scipy", "tag"] |str
CommitConvention = str
VersionStr = str
CommitMsg = str
ChangelogTypeHeading = str
Expand DownExpand Up@@ -338,8 +338,9 @@ def build_version_entry(version: VersionStr, version_def: RepoVersionDef) -> str

for section_def in version_def["changelog_sections"]:
version_entry.append(f"### {section_def['section']}\n")
for i in section_def["i_commits"]:
version_entry.append(f"* {version_def['commits'][i]}\n")
version_entry.extend(
[f"* {version_def['commits'][i]}\n" for i in section_def["i_commits"]]
)

return str.join("\n", version_entry)

Expand Down
41 changes: 0 additions & 41 deletionstests/fixtures/scipy.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -394,44 +394,3 @@ def scipy_major_mixed_commits(
),
)
)


# @pytest.fixture(
# params=xdist_sort_hack(
# [
# k
# for k, v in ScipyParserOptions().tag_to_level.items()
# if v is LevelBump.MAJOR
# ]
# )
# )
# def scipy_major_commits(request, subject, default_scipy_parser_options):
# patch_tags = [
# k
# for k, v in default_scipy_parser_options.tag_to_level.items()
# if v is LevelBump.PATCH
# ]
# minor_tags = [
# k
# for k, v in default_scipy_parser_options.tag_to_level.items()
# if v is LevelBump.MINOR
# ]
# patch_commits = [
# _make_scipy_commit(random.choice(patch_tags), subject, body_parts)
# for body_parts in SCIPY_FORMATTED_COMMIT_BODY_PARTS
# ]
# minor_commits = [
# _make_scipy_commit(random.choice(minor_tags), subject, body_parts)
# for body_parts in SCIPY_FORMATTED_COMMIT_BODY_PARTS
# ]
# major_commits = [
# _make_scipy_commit(request.param, subject, body_parts)
# for body_parts in SCIPY_FORMATTED_COMMIT_BODY_PARTS
# ]
# return list(
# chain.from_iterable(
# zip_longest(
# major_commits, minor_commits, patch_commits, fillvalue="uninteresting"
# )
# )
# )
29 changes: 13 additions & 16 deletionstests/scenario/test_next_version.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -802,10 +802,9 @@ def test_algorithm_no_zero_dot_versions_tag(
)
),
*(
# when allow_zero_version is True,
# prerelease is True, & major_on_zero is False, the version should be
# minor bumped, when given commits of a minor or major level because
# major_on_zero = False
# when allow_zero_version is True, prerelease is True, & major_on_zero
# is False, the version should be minor bumped, when given commits of a
# minor or major level because major_on_zero = False
(commits, False, False, True, "0.3.0")
for commits in (
lazy_fixture(angular_minor_commits.__name__),
Expand DownExpand Up@@ -1212,10 +1211,9 @@ def test_algorithm_with_zero_dot_versions_angular(
)
),
*(
# when allow_zero_version is True,
# prerelease is True, & major_on_zero is False, the version should be
# minor bumped, when given commits of a minor or major level because
# major_on_zero = False
# when allow_zero_version is True, prerelease is True, & major_on_zero
# is False, the version should be minor bumped, when given commits of a
# minor or major level because major_on_zero = False
(commits, False, False, True, "0.3.0")
for commits in (
lazy_fixture(emoji_minor_commits.__name__),
Expand DownExpand Up@@ -1622,10 +1620,9 @@ def test_algorithm_with_zero_dot_versions_emoji(
)
),
*(
# when allow_zero_version is True,
# prerelease is True, & major_on_zero is False, the version should be
# minor bumped, when given commits of a minor or major level because
# major_on_zero = False
# when allow_zero_version is True, prerelease is True, & major_on_zero
# is False, the version should be minor bumped, when given commits of a
# minor or major level because major_on_zero = False
(commits, False, False, True, "0.3.0")
for commits in (
lazy_fixture(scipy_minor_commits.__name__),
Expand DownExpand Up@@ -2026,10 +2023,10 @@ def test_algorithm_with_zero_dot_versions_scipy(
)
),
*(
# when allow_zero_version is True,
#prerelease is True,& major_on_zero is False, the version should be
#minorbumped, when given commits of a minor or major level because
# major_on_zero = False
# when allow_zero_version is True, prerelease is True,
# & major_on_zero is False, the version should be minor
# bumped, when given commits of a minor or major level
#becausemajor_on_zero = False
(commits, False, False, True, "0.3.0")
for commits in (
lazy_fixture(tag_minor_commits.__name__),
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp