Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: setup-uv
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
version: "latest"
enable-cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: setup-uv
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
python-version: ${{ inputs.python_version }}
version: "latest"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-reproducibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: setup-uv
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
version: "latest"
enable-cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: echo "${{ matrix.python-version }}" > .python-version

- name: setup-uv
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
version: "latest"
enable-cache: true
Expand Down
16 changes: 8 additions & 8 deletions bakefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
class MyBakebook(PythonLibSpace):
ci: bool = False

def lint(self, ctx: Context) -> None:
ctx.run("uv run python scripts/sort_tags.py")
ctx.run("uv run python scripts/check_tag_problems.py")
super().lint(ctx)
def lint(self) -> None:
self.ctx.run("uv run python scripts/sort_tags.py")
self.ctx.run("uv run python scripts/check_tag_problems.py")
super().lint()

def test(self, ctx: Context) -> None:
def test(self) -> None:
tests_paths: list[str] = ["tests/", "leetcode/"]
self._test(ctx, tests_paths=tests_paths)
self._test(tests_paths=tests_paths)

def is_problem_exist(self, problem: str) -> Path:
problem_path = Path(f"leetcode/{problem}")
Expand All @@ -32,10 +32,10 @@ def is_problem_exist(self, problem: str) -> Path:
return problem_path

@command("p-test", help="Run problem specific tests")
def problem_test(self, ctx: Context, problem: problem_option = PROBLEM):
def problem_test(self, problem: problem_option = PROBLEM):
problem_path = self.is_problem_exist(problem)
tests_path = str(problem_path / "test_solution.py")
self._test(ctx, tests_paths=tests_path, verbose=True, coverage_report=False)
self._test(tests_paths=tests_path, verbose=True, coverage_report=False)

@command("p-gen", help="Generate specific problem")
def problem_gen(
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ classifiers = [
]
dependencies = [
"anytree>=2.13.0",
"bakefile[lib]>=0.0.8",
"cookiecutter>=2.6.0",
"graphviz>=0.21",
"json5>=0.13.0",
Expand All @@ -46,6 +45,7 @@ Repository = "https://github.com/wislertt/leetcode-py"

[dependency-groups]
dev = [
"bakefile[lib]>=0.0.8",
"deptry>=0.24.0",
"ipykernel>=7.0.0",
"isort>=7.0.0",
Expand All @@ -60,7 +60,7 @@ dev = [
]

[build-system]
requires = ["uv_build>=0.9.18,<0.10.0"]
requires = ["uv_build>=0.10.0,<0.11.0"]
build-backend = "uv_build"

[tool.coverage.run]
Expand All @@ -72,6 +72,7 @@ omit = [
known_first_party = ["leetcode_py"]
extend_exclude = [
".claude",
"bakefile.py",
"leetcode",
"src/leetcode_py/cli/resources"
]
Expand Down
6 changes: 3 additions & 3 deletions src/leetcode_py/cli/commands/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def list_problems(

# Sort by problem number (convert to int for proper numerical sorting)
problem_list.sort(
key=lambda x: int(x[0].get("number", "999999"))
if x[0].get("number", "?").isdigit()
else 999999
key=lambda x: (
int(x[0].get("number", "999999")) if x[0].get("number", "?").isdigit() else 999999
)
)

# Update table title with count
Expand Down
340 changes: 169 additions & 171 deletions uv.lock

Large diffs are not rendered by default.