Skip to content

Implement recursive binary search in Python #1493

Implement recursive binary search in Python

Implement recursive binary search in Python #1493

Triggered via pull request September 22, 2026 05:59
Status Success
Total duration 23s
Artifacts

ty.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors, 6 warnings, and 1 notice
ty (unresolved-attribute): scripts/validate_solutions.py#L34
scripts/validate_solutions.py:34:5: unresolved-attribute: Attribute `exec_module` is not defined on `None` in union `Loader | None`
ty (invalid-argument-type): scripts/validate_solutions.py#L33
scripts/validate_solutions.py:33:46: invalid-argument-type: Argument to function `module_from_spec` is incorrect: Expected `ModuleSpec`, found `ModuleSpec | None` info: element `None` of union `ModuleSpec | None` is not assignable to `ModuleSpec` stdlib/_frozen_importlib.pyi:45:5: info: Function defined here stdlib/_frozen_importlib.pyi:45:22: Parameter declared here
ty (unresolved-import): scripts/validate_solutions.py#L19
scripts/validate_solutions.py:19:8: unresolved-import: Cannot resolve imported module `pytest` info: Searched in the following paths during module resolution: info: 1. vendored://stdlib (stdlib typeshed stubs vendored by ty) info: 2. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib/python3.14/site-packages (site-packages) info: 3. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib64/python3.14/site-packages (site-packages) info: 4. /home/runner/work/Python/Python/.venv/lib/python3.14/site-packages (site-packages) info: 5. /home/runner/work/Python/Python/.venv/lib64/python3.14/site-packages (site-packages) info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
ty (invalid-assignment): other/dancing_links.py#L69
other/dancing_links.py:69:17: invalid-assignment: Object of type `DLXNode` is not assignable to attribute `up` of type `ColumnNode`
ty (invalid-assignment): other/dancing_links.py#L68
other/dancing_links.py:68:17: invalid-assignment: Object of type `DLXNode` is not assignable to attribute `down` of type `ColumnNode`
ty (unresolved-import): maths/test_factorial.py#L10
maths/test_factorial.py:10:6: unresolved-import: Cannot resolve imported module `maths.factorial` info: Searched in the following paths during module resolution: info: 1. vendored://stdlib (stdlib typeshed stubs vendored by ty) info: 2. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib/python3.14/site-packages (site-packages) info: 3. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib64/python3.14/site-packages (site-packages) info: 4. /home/runner/work/Python/Python/.venv/lib/python3.14/site-packages (site-packages) info: 5. /home/runner/work/Python/Python/.venv/lib64/python3.14/site-packages (site-packages) info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
ty (unresolved-import): maths/test_factorial.py#L8
maths/test_factorial.py:8:8: unresolved-import: Cannot resolve imported module `pytest` info: Searched in the following paths during module resolution: info: 1. vendored://stdlib (stdlib typeshed stubs vendored by ty) info: 2. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib/python3.14/site-packages (site-packages) info: 3. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib64/python3.14/site-packages (site-packages) info: 4. /home/runner/work/Python/Python/.venv/lib/python3.14/site-packages (site-packages) info: 5. /home/runner/work/Python/Python/.venv/lib64/python3.14/site-packages (site-packages) info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
ty (unresolved-import): maths/test_abs.py#L10
maths/test_abs.py:10:6: unresolved-import: Cannot resolve imported module `maths.abs` info: Searched in the following paths during module resolution: info: 1. vendored://stdlib (stdlib typeshed stubs vendored by ty) info: 2. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib/python3.14/site-packages (site-packages) info: 3. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib64/python3.14/site-packages (site-packages) info: 4. /home/runner/work/Python/Python/.venv/lib/python3.14/site-packages (site-packages) info: 5. /home/runner/work/Python/Python/.venv/lib64/python3.14/site-packages (site-packages) info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
ty (unresolved-import): maths/test_abs.py#L8
maths/test_abs.py:8:8: unresolved-import: Cannot resolve imported module `pytest` info: Searched in the following paths during module resolution: info: 1. vendored://stdlib (stdlib typeshed stubs vendored by ty) info: 2. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib/python3.14/site-packages (site-packages) info: 3. /home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp4KF0hE/lib64/python3.14/site-packages (site-packages) info: 4. /home/runner/work/Python/Python/.venv/lib/python3.14/site-packages (site-packages) info: 5. /home/runner/work/Python/Python/.venv/lib64/python3.14/site-packages (site-packages) info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
ty (invalid-assignment): computer_vision/mean_threshold.py#L24
computer_vision/mean_threshold.py:24:13: invalid-assignment: Cannot assign to a subscript on an object of type `None` info: The full type of the subscripted object is `PixelAccess | None` info: `None` does not have a `__setitem__` method.
ty (redundant-condition): web_programming/current_weather.py#L33
web_programming/current_weather.py:33:8: redundant-condition: Object of type `Literal[""]` is always falsy web_programming/current_weather.py:34:9: This statement is unreachable
ty (redundant-condition): web_programming/current_weather.py#L27
web_programming/current_weather.py:27:8: redundant-condition: Object of type `Literal[""]` is always falsy web_programming/current_weather.py:28:9: This statement is unreachable
ty (redundant-condition): matrix/matrix_operation.py#L44
matrix/matrix_operation.py:44:13: redundant-condition: Expression `_verify_matrix_sizes(matrix_a, matrix_b)` is always truthy (has type `tuple[tuple[int, int], tuple[int, int]]`)
ty (redundant-condition): machine_learning/dimensionality_reduction.py#L146
machine_learning/dimensionality_reduction.py:146:8: redundant-condition: Method `ndarray.any` is always truthy: Did you mean to call this method? machine_learning/dimensionality_reduction.py:158:5: This following branch is unreachable help: Replace with `features.any(...)`
ty (truthiness-test-of-iterable): divide_and_conquer/convex_hull.py#L120
divide_and_conquer/convex_hull.py:120:8: truthiness-test-of-iterable: Variable `list_of_tuples` might be truthy even if its length is 0 (has type `list[Point] | Iterable[list[float]]`) divide_and_conquer/convex_hull.py:89:21: Inferred as `list[Point] | Iterable[list[float]]` due to this annotation info: `list[Point] | Iterable[list[float]]` objects can be generators, and generators are truthy even when empty help: Test the length of the iterable instead of its truthiness
ty (truthiness-test-of-iterable): data_structures/linked_list/print_reverse.py#L102
data_structures/linked_list/print_reverse.py:102:12: truthiness-test-of-iterable: Variable `elements_list` might be truthy even if its length is 0 (has type `Iterable[int]`) data_structures/linked_list/print_reverse.py:88:37: Inferred as `Iterable[int]` due to this annotation info: `Iterable[int]` objects can be generators, and generators are truthy even when empty help: Use `collections.abc.Collection[int]` as the annotation on line 88 info: A `Collection` must define `__len__`, so `Collection` excludes generators help: Alternatively, test the length of the iterable instead of its truthiness
ty
"The ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026. For more information, see https://github.com/actions/runner-images/issues/14748"