Skip to content

Commit a0be55e

Browse files
Merge branch 'master' into issue_12840
2 parents 29495cd + a8c5616 commit a0be55e

File tree

8 files changed

+13
-17
lines changed

8 files changed

+13
-17
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
- uses: astral-sh/setup-uv@v6
1414
with:
1515
enable-cache: true
1616
cache-dependency-glob: uv.lock
1717
- uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.13
19+
python-version: 3.x
2020
allow-prereleases: true
2121
- run: uv sync --group=test
2222
- name: Run tests
@@ -30,6 +30,7 @@ jobs:
3030
--ignore=project_euler/
3131
--ignore=quantum/q_fourier_transform.py
3232
--ignore=scripts/validate_solutions.py
33+
--ignore=web_programming/current_stock_price.py
3334
--ignore=web_programming/fetch_anime_and_play.py
3435
--cov-report=term-missing:skip-covered
3536
--cov=. .

.github/workflows/devcontainer_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
- uses: devcontainers/[email protected]
1717
with:
1818
push: never

.github/workflows/directory_writer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
directory_writer:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
9+
- uses: actions/checkout@v5
1010
with:
1111
fetch-depth: 0
1212
- uses: actions/setup-python@v5

.github/workflows/project_euler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
project-euler:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818
- uses: astral-sh/setup-uv@v6
1919
- uses: actions/setup-python@v5
2020
with:
@@ -24,7 +24,7 @@ jobs:
2424
validate-solutions:
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828
- uses: astral-sh/setup-uv@v6
2929
- uses: actions/setup-python@v5
3030
with:

.github/workflows/ruff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
ruff:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
- uses: astral-sh/setup-uv@v6
1616
- run: uvx ruff check --output-format=github .

.github/workflows/sphinx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
build_docs:
2626
runs-on: ubuntu-24.04-arm
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v5
2929
- uses: astral-sh/setup-uv@v6
3030
- uses: actions/setup-python@v5
3131
with:
@@ -34,7 +34,7 @@ jobs:
3434
- run: uv sync --group=docs
3535
- uses: actions/configure-pages@v5
3636
- run: uv run sphinx-build -c docs . docs/_build/html
37-
- uses: actions/upload-pages-artifact@v3
37+
- uses: actions/upload-pages-artifact@v4
3838
with:
3939
path: docs/_build/html
4040

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-executables-have-shebangs
66
- id: check-toml
@@ -16,7 +16,7 @@ repos:
1616
- id: auto-walrus
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.12.4
19+
rev: v0.12.9
2020
hooks:
2121
- id: ruff-check
2222
- id: ruff-format

strings/capitalize.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
from string import ascii_lowercase, ascii_uppercase
2-
3-
41
def capitalize(sentence: str) -> str:
52
"""
63
Capitalizes the first letter of a sentence or word.
@@ -19,11 +16,9 @@ def capitalize(sentence: str) -> str:
1916
if not sentence:
2017
return ""
2118

22-
# Create a dictionary that maps lowercase letters to uppercase letters
2319
# Capitalize the first character if it's a lowercase letter
2420
# Concatenate the capitalized character with the rest of the string
25-
lower_to_upper = dict(zip(ascii_lowercase, ascii_uppercase))
26-
return lower_to_upper.get(sentence[0], sentence[0]) + sentence[1:]
21+
return sentence[0].upper() + sentence[1:]
2722

2823

2924
if __name__ == "__main__":

0 commit comments

Comments
 (0)