Skip to content

Commit

Permalink
Line break.
Browse files Browse the repository at this point in the history
  • Loading branch information
tslmy committed Dec 22, 2022
1 parent 85e1a08 commit 5839639
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pyjami/java_symbol_migration_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def migrate(
if symbol_declaration_pattern.search(line):
lines.insert(
i,
f'@Deprecated(since="{datetime.now().strftime("%c")}", forRemoval=true)',
f'@Deprecated(since="{datetime.now().strftime("%c")}", forRemoval=true){os.linesep}',
)
is_deprecation_annotated = True
break
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyjami"
version = "0.1.5"
version = "0.1.6"
description = "Migrate Java code with Python."
authors = ["Mingyang Li <mingyli@ebay.com>"]
readme = "README.md"
Expand Down
6 changes: 4 additions & 2 deletions tests/test_java_symbol_migration_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
)
from pathlib import Path
import os
import re
from shutil import copytree
from difflib import unified_diff

Expand Down Expand Up @@ -136,6 +137,7 @@ def test_migrate_with_deprecation(tmp_path):
deprecate_only=True,
)
assert original_file_path.is_file(), "The original Java file should remain."
assert (
"@Deprecated(" in original_file_path.read_text()
assert re.search(
rf'@Deprecated\(since=".+?", forRemoval=true\)\nclass Lorem',
original_file_path.read_text(),
), "Deprecation annotation should present in the file."

0 comments on commit 5839639

Please sign in to comment.