File tree Expand file tree Collapse file tree 8 files changed +13
-17
lines changed Expand file tree Collapse file tree 8 files changed +13
-17
lines changed Original file line number Diff line number Diff line change 9
9
build :
10
10
runs-on : ubuntu-latest
11
11
steps :
12
- - uses : actions/checkout@v4
12
+ - uses : actions/checkout@v5
13
13
- uses : astral-sh/setup-uv@v6
14
14
with :
15
15
enable-cache : true
16
16
cache-dependency-glob : uv.lock
17
17
- uses : actions/setup-python@v5
18
18
with :
19
- python-version : 3.13
19
+ python-version : 3.x
20
20
allow-prereleases : true
21
21
- run : uv sync --group=test
22
22
- name : Run tests
30
30
--ignore=project_euler/
31
31
--ignore=quantum/q_fourier_transform.py
32
32
--ignore=scripts/validate_solutions.py
33
+ --ignore=web_programming/current_stock_price.py
33
34
--ignore=web_programming/fetch_anime_and_play.py
34
35
--cov-report=term-missing:skip-covered
35
36
--cov=. .
Original file line number Diff line number Diff line change 12
12
build :
13
13
runs-on : ubuntu-latest
14
14
steps :
15
- - uses : actions/checkout@v4
15
+ - uses : actions/checkout@v5
16
16
-
uses :
devcontainers/[email protected]
17
17
with :
18
18
push : never
Original file line number Diff line number Diff line change 6
6
directory_writer :
7
7
runs-on : ubuntu-latest
8
8
steps :
9
- - uses : actions/checkout@v4
9
+ - uses : actions/checkout@v5
10
10
with :
11
11
fetch-depth : 0
12
12
- uses : actions/setup-python@v5
Original file line number Diff line number Diff line change 14
14
project-euler :
15
15
runs-on : ubuntu-latest
16
16
steps :
17
- - uses : actions/checkout@v4
17
+ - uses : actions/checkout@v5
18
18
- uses : astral-sh/setup-uv@v6
19
19
- uses : actions/setup-python@v5
20
20
with :
24
24
validate-solutions :
25
25
runs-on : ubuntu-latest
26
26
steps :
27
- - uses : actions/checkout@v4
27
+ - uses : actions/checkout@v5
28
28
- uses : astral-sh/setup-uv@v6
29
29
- uses : actions/setup-python@v5
30
30
with :
Original file line number Diff line number Diff line change 11
11
ruff :
12
12
runs-on : ubuntu-latest
13
13
steps :
14
- - uses : actions/checkout@v4
14
+ - uses : actions/checkout@v5
15
15
- uses : astral-sh/setup-uv@v6
16
16
- run : uvx ruff check --output-format=github .
Original file line number Diff line number Diff line change 25
25
build_docs :
26
26
runs-on : ubuntu-24.04-arm
27
27
steps :
28
- - uses : actions/checkout@v4
28
+ - uses : actions/checkout@v5
29
29
- uses : astral-sh/setup-uv@v6
30
30
- uses : actions/setup-python@v5
31
31
with :
34
34
- run : uv sync --group=docs
35
35
- uses : actions/configure-pages@v5
36
36
- run : uv run sphinx-build -c docs . docs/_build/html
37
- - uses : actions/upload-pages-artifact@v3
37
+ - uses : actions/upload-pages-artifact@v4
38
38
with :
39
39
path : docs/_build/html
40
40
Original file line number Diff line number Diff line change 1
1
repos :
2
2
- repo : https://github.com/pre-commit/pre-commit-hooks
3
- rev : v5 .0.0
3
+ rev : v6 .0.0
4
4
hooks :
5
5
- id : check-executables-have-shebangs
6
6
- id : check-toml
16
16
- id : auto-walrus
17
17
18
18
- repo : https://github.com/astral-sh/ruff-pre-commit
19
- rev : v0.12.4
19
+ rev : v0.12.9
20
20
hooks :
21
21
- id : ruff-check
22
22
- id : ruff-format
Original file line number Diff line number Diff line change 1
- from string import ascii_lowercase , ascii_uppercase
2
-
3
-
4
1
def capitalize (sentence : str ) -> str :
5
2
"""
6
3
Capitalizes the first letter of a sentence or word.
@@ -19,11 +16,9 @@ def capitalize(sentence: str) -> str:
19
16
if not sentence :
20
17
return ""
21
18
22
- # Create a dictionary that maps lowercase letters to uppercase letters
23
19
# Capitalize the first character if it's a lowercase letter
24
20
# 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 :]
27
22
28
23
29
24
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments