Skip to content
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

Awaiting v4.0.0: Remove csingle and css shorthands #1019

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 0 additions & 3 deletions src/reuse/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,3 @@ def _all_style_classes() -> List[Type[CommentStyle]]:

#: A map of human-friendly names against style classes.
NAME_STYLE_MAP = {style.SHORTHAND: style for style in _result}
# TODO: Remove this for next major 4.0 release.
NAME_STYLE_MAP["csingle"] = CppSingleCommentStyle
NAME_STYLE_MAP["css"] = CCommentStyle
50 changes: 0 additions & 50 deletions tests/test_main_annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,54 +1574,4 @@ def test_annotate_exit_if_unrecognised(
assert "Jane Doe" not in (fake_repository / "baz/foo.py").read_text()


def test_annotate_csingle(fake_repository, stringio, mock_date_today):
"""Old csingle style is identical to new cppsingle style.

Remove this in the 4.0 major release.
"""
(fake_repository / "csingle.py").write_text("pass")
(fake_repository / "cppsingle.py").write_text("pass")

for style in ["csingle", "cppsingle"]:
main(
[
"annotate",
"--copyright",
"Jane Doe",
"--style",
style,
f"{style}.py",
]
)

assert (fake_repository / "csingle.py").read_text() == (
fake_repository / "cppsingle.py"
).read_text()


def test_annotate_css(fake_repository, stringio, mock_date_today):
"""Old css style is identical to new c style.

Remove this in the 4.0 major release.
"""
(fake_repository / "css.py").write_text("pass")
(fake_repository / "c.py").write_text("pass")

for style in ["css", "c"]:
main(
[
"annotate",
"--copyright",
"Jane Doe",
"--style",
style,
f"{style}.py",
]
)

assert (fake_repository / "css.py").read_text() == (
fake_repository / "c.py"
).read_text()


# REUSE-IgnoreEnd
Loading