crackerjack 0.13.0__tar.gz → 0.13.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {crackerjack-0.13.0 → crackerjack-0.13.2}/PKG-INFO +1 -1
- crackerjack-0.13.2/crackerjack/.ruff_cache/0.9.10/12813592349865671909 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/crackerjack.py +4 -5
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/pyproject.toml +2 -2
- {crackerjack-0.13.0 → crackerjack-0.13.2}/pyproject.toml +2 -2
- crackerjack-0.13.2/tests/data/comments_sample.txt +10 -0
- crackerjack-0.13.2/tests/data/expected_comments_sample.txt +8 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/tests/test_crackerjack.py +6 -11
- crackerjack-0.13.0/crackerjack/.ruff_cache/0.9.10/12813592349865671909 +0 -0
- crackerjack-0.13.0/tests/data/comments_sample.txt +0 -7
- {crackerjack-0.13.0 → crackerjack-0.13.2}/LICENSE +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/README.md +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.coverage +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.gitignore +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.libcst.codemod.yaml +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.pdm.toml +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.pre-commit-config.yaml +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.pytest_cache/.gitignore +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.pytest_cache/CACHEDIR.TAG +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.pytest_cache/README.md +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.pytest_cache/v/cache/nodeids +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.pytest_cache/v/cache/stepwise +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/.gitignore +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.11/3256171999636029978 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.14/602324811142551221 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.4/10355199064880463147 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.6/15140459877605758699 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.7/1790508110482614856 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.9/17041001205004563469 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.2.0/10047773857155985907 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.2.1/8522267973936635051 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.2.2/18053836298936336950 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.3.0/12548816621480535786 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.3.3/11081883392474770722 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.3.4/676973378459347183 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.3.5/16311176246009842383 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.5.7/1493622539551733492 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.5.7/6231957614044513175 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.5.7/9932762556785938009 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.0/11982804814124138945 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.0/12055761203849489982 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.2/1206147804896221174 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.4/1206147804896221174 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.5/1206147804896221174 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.7/3657366982708166874 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.9/285614542852677309 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.7.1/1024065805990144819 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.7.1/285614542852677309 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.7.3/16061516852537040135 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.8.4/16354268377385700367 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.9.3/13948373885254993391 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.9.9/12813592349865671909 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.9.9/8843823720003377982 +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/CACHEDIR.TAG +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/__init__.py +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/__main__.py +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/tests/__init__.py +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/tests/data/docstrings_sample.txt +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/tests/data/init.py +0 -0
- {crackerjack-0.13.0 → crackerjack-0.13.2}/tests/test_main.py +0 -0
Binary file
|
@@ -66,11 +66,10 @@ class CodeCleaner(BaseModel, arbitrary_types_allowed=True):
|
|
66
66
|
comment_start = comment_match.start()
|
67
67
|
code_part = line[:comment_start].rstrip()
|
68
68
|
comment = line[comment_start:].strip()
|
69
|
-
if
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
cleaned_lines.append(code_part)
|
69
|
+
if re.match("^#\\s*(?:type: ignore|noqa)(?:\\[[^\\]]*\\])?", comment):
|
70
|
+
cleaned_lines.append(line)
|
71
|
+
elif code_part:
|
72
|
+
cleaned_lines.append(code_part)
|
74
73
|
return "\n".join(cleaned_lines)
|
75
74
|
|
76
75
|
def remove_extra_whitespace(self, code: str) -> str:
|
@@ -114,13 +114,13 @@ reportUnknownArgumentType = false
|
|
114
114
|
reportInvalidTypeForm = false
|
115
115
|
reportUnknownLambdaType = false
|
116
116
|
reportUnknownParameterType = "warning"
|
117
|
-
reportPrivateUsage =
|
117
|
+
reportPrivateUsage = false
|
118
118
|
pythonVersion = "3.13"
|
119
119
|
pythonPlatform = "Darwin"
|
120
120
|
|
121
121
|
[project]
|
122
122
|
name = "crackerjack"
|
123
|
-
version = "0.
|
123
|
+
version = "0.13.1"
|
124
124
|
description = "Default template for PDM package"
|
125
125
|
requires-python = ">=3.13"
|
126
126
|
readme = "README.md"
|
@@ -118,13 +118,13 @@ reportUnknownArgumentType = false
|
|
118
118
|
reportInvalidTypeForm = false
|
119
119
|
reportUnknownLambdaType = false
|
120
120
|
reportUnknownParameterType = "warning"
|
121
|
-
reportPrivateUsage =
|
121
|
+
reportPrivateUsage = false
|
122
122
|
pythonVersion = "3.13"
|
123
123
|
pythonPlatform = "Darwin"
|
124
124
|
|
125
125
|
[project]
|
126
126
|
name = "crackerjack"
|
127
|
-
version = "0.13.
|
127
|
+
version = "0.13.2"
|
128
128
|
description = "Default template for PDM package"
|
129
129
|
requires-python = ">=3.13"
|
130
130
|
readme = "README.md"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
def test_func():
|
2
|
+
# This comment should be removed
|
3
|
+
return True # remove this inline comment
|
4
|
+
|
5
|
+
async def load_bytecode(self, bucket: Bucket) -> t.Optional[bytes]: # type: ignore[override]
|
6
|
+
code = await self.client.get(self.get_bucket_name(bucket.key)) # type: ignore
|
7
|
+
|
8
|
+
# Full line comment
|
9
|
+
x = 1 # type: ignore
|
10
|
+
y = 2 # noqa
|
@@ -905,6 +905,7 @@ class TestCrackerjackProcess:
|
|
905
905
|
assert '"""Method docstring."""' not in cleaned_code, f"Got: {cleaned_code!r}"
|
906
906
|
|
907
907
|
def test_code_cleaner_remove_line_comments(self) -> None:
|
908
|
+
from pathlib import Path
|
908
909
|
from rich.console import Console
|
909
910
|
from crackerjack.crackerjack import CodeCleaner
|
910
911
|
|
@@ -913,18 +914,12 @@ class TestCrackerjackProcess:
|
|
913
914
|
Path(__file__).parent / "data" / "comments_sample.txt"
|
914
915
|
).read_text()
|
915
916
|
cleaned_code = code_cleaner.remove_line_comments(code_with_comments)
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
assert "# remove this inline comment" not in cleaned_code, (
|
922
|
-
f"Got: {cleaned_code!r}"
|
917
|
+
expected_cleaned = (
|
918
|
+
Path(__file__).parent / "data" / "expected_comments_sample.txt"
|
919
|
+
).read_text()
|
920
|
+
assert cleaned_code == expected_cleaned, (
|
921
|
+
f"Cleaned code does not match expected.\nExpected:\n{expected_cleaned}\nGot:\n{cleaned_code}"
|
923
922
|
)
|
924
|
-
assert (
|
925
|
-
"def test_func():\n return True\n\nx = 1 # type: ignore\ny = 2 # noqa\n"
|
926
|
-
in cleaned_code
|
927
|
-
), f"Got: {cleaned_code!r}"
|
928
923
|
|
929
924
|
def test_code_cleaner_remove_extra_whitespace(self) -> None:
|
930
925
|
from rich.console import Console
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.11/3256171999636029978
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.4/10355199064880463147
RENAMED
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.6/15140459877605758699
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.1.9/17041001205004563469
RENAMED
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.2.0/10047773857155985907
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.2.2/18053836298936336950
RENAMED
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.3.0/12548816621480535786
RENAMED
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.3.3/11081883392474770722
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.3.5/16311176246009842383
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.0/11982804814124138945
RENAMED
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.6.0/12055761203849489982
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.7.3/16061516852537040135
RENAMED
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.8.4/16354268377385700367
RENAMED
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.9.3/13948373885254993391
RENAMED
File without changes
|
{crackerjack-0.13.0 → crackerjack-0.13.2}/crackerjack/.ruff_cache/0.9.9/12813592349865671909
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|