Skip to content

Commit 9d6f97e

Browse files
committed
style: apply pre-commit fixes (formatting, notebook conversion)
1 parent fa858c4 commit 9d6f97e

File tree

5 files changed

+32
-71
lines changed

5 files changed

+32
-71
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
- id: check-added-large-files
1717
args: ["--maxkb=20000"]
1818
- repo: https://github.com/gitleaks/gitleaks
19-
rev: v8.29.1
19+
rev: v8.30.0
2020
hooks:
2121
- name: gitleaks
2222
id: gitleaks

leetcode/palindrome_partitioning/playground.ipynb

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# ---
2+
# jupyter:
3+
# jupytext:
4+
# text_representation:
5+
# extension: .py
6+
# format_name: percent
7+
# format_version: '1.3'
8+
# jupytext_version: 1.18.1
9+
# kernelspec:
10+
# display_name: leetcode-py-py3.13
11+
# language: python
12+
# name: python3
13+
# ---
14+
15+
# %%
16+
from helpers import assert_partition, run_partition
17+
from solution import Solution
18+
19+
# %%
20+
# Example test case
21+
s = "aab"
22+
expected = [["a", "a", "b"], ["aa", "b"]]
23+
24+
# %%
25+
result = run_partition(Solution, s)
26+
result
27+
28+
# %%
29+
assert_partition(result, expected)

leetcode/palindrome_partitioning/test_solution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def setup_method(self):
2525
("zz", [["z", "z"], ["zz"]]),
2626
("efe", [["e", "f", "e"], ["efe"]]),
2727
("xyx", [["x", "y", "x"], ["xyx"]]),
28-
("noon", [["n", "o", "o", 'n'], ['n', 'oo', 'n'], ['noon']]),
28+
("noon", [["n", "o", "o", "n"], ["n", "oo", "n"], ["noon"]]),
2929
],
3030
)
3131
def test_partition(self, s: str, expected: list[list[str]]):

leetcode_py/cli/resources/leetcode/json/problems/palindrome_partitioning.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@
8181
"playground_setup": "# Example test case\ns = 'aab'\nexpected = [['a', 'a', 'b'], ['aa', 'b']]",
8282
"playground_run": "result = run_partition(Solution, s)\nresult",
8383
"playground_assert": "assert_partition(result, expected)"
84-
}
84+
}

0 commit comments

Comments
 (0)