Skip to content

Commit 1dc914a

Browse files
[pre-commit.ci] pre-commit autoupdate (NVIDIA#1426)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: 9c89adb347f6b973f4905a4be0051eb2ecf85dea → 5ba58aca0bd5bc7c0e1c0fc45af2e88d6a2bde83](astral-sh/ruff-pre-commit@9c89adb...5ba58ac) - [github.com/pre-commit/mirrors-mypy: 9f70dc58c23dfcca1b97af99eaeee3140a807c7e → a66e98df7b4aeeb3724184b332785976d062b92e](pre-commit/mirrors-mypy@9f70dc5...a66e98d) - [github.com/rhysd/actionlint: 03d0035246f3e81f36aed592ffb4bebf33a03106 → 0933c147c9d6587653d45fdcb4c497c57a65f9af](rhysd/actionlint@03d0035...0933c14) - [github.com/MarcoGorelli/cython-lint: d9ff7ce99ef4f2ae8fba93079ca9d76c4651d4ac → 8e4297a1b56d0c5be6f79be4e28d08e71d6c05b9](MarcoGorelli/cython-lint@d9ff7ce...8e4297a) * Revert cython-lint * Remove unnecessary types on used workflows * Remove unused imports --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Michael Droettboom <mdboom@gmail.com>
1 parent 36742dd commit 1dc914a

5 files changed

Lines changed: 6 additions & 14 deletions

File tree

.github/actions/doc_preview/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ description: Preview or clean up docs built from PRs
1010
inputs:
1111
source-folder:
1212
required: true
13-
type: string
1413
description: "Source code directory"
1514
pr-number:
1615
required: true
17-
type: string
1816
description: "Pull request number"
1917

2018
runs:

.github/actions/fetch_ctk/action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,15 @@ description: Fetch (or create) a mini CUDA Toolkit from cache
99
inputs:
1010
host-platform:
1111
required: true
12-
type: string
1312
cuda-version:
1413
required: true
15-
type: string
1614
cuda-components:
1715
description: "A list of the CTK components to install as a comma-separated list. e.g. 'cuda_nvcc,cuda_nvrtc,cuda_cudart'"
1816
required: false
19-
type: string
2017
default: "cuda_nvcc,cuda_cudart,cuda_crt,libnvvm,cuda_nvrtc,cuda_profiler_api,cuda_cccl,libnvjitlink,libcufile"
2118
cuda-path:
2219
description: "where the CTK components will be installed to, relative to $PWD"
2320
required: false
24-
type: string
2521
default: "./cuda_toolkit"
2622

2723
runs:

.github/actions/install_unix_deps/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ description: Install needed dependencies, regardless if using GitHub- or self- h
99
inputs:
1010
dependencies:
1111
required: true
12-
type: string
1312
dependent_exes:
1413
required: true
15-
type: string
1614

1715
runs:
1816
using: composite

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ci:
1515
# pre-commit autoupdate --freeze
1616
repos:
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: 9c89adb347f6b973f4905a4be0051eb2ecf85dea # frozen: v0.13.3
18+
rev: 5ba58aca0bd5bc7c0e1c0fc45af2e88d6a2bde83 # frozen: v0.14.10
1919
hooks:
2020
- id: ruff-check
2121
args: [--fix, --show-fixes]
@@ -68,15 +68,15 @@ repos:
6868
- id: rst-inline-touching-normal
6969

7070
- repo: https://github.com/pre-commit/mirrors-mypy
71-
rev: 9f70dc58c23dfcca1b97af99eaeee3140a807c7e # frozen: v1.18.2
71+
rev: a66e98df7b4aeeb3724184b332785976d062b92e # frozen: v1.19.1
7272
hooks:
7373
- id: mypy
7474
name: mypy-pathfinder
7575
files: ^cuda_pathfinder/cuda/.*\.py$ # Exclude tests directory
7676
args: [--config-file=cuda_pathfinder/pyproject.toml]
7777

7878
- repo: https://github.com/rhysd/actionlint
79-
rev: "03d0035246f3e81f36aed592ffb4bebf33a03106" # frozen: v1.7.7
79+
rev: "0933c147c9d6587653d45fdcb4c497c57a65f9af" # frozen: v1.7.10
8080
hooks:
8181
- id: actionlint
8282
args: ["-shellcheck="]

cuda_core/cuda/core/_device.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ from cuda.bindings cimport cydriver
99
from cuda.core._utils.cuda_utils cimport HANDLE_RETURN
1010

1111
import threading
12-
from typing import Optional, TYPE_CHECKING, Union
12+
from typing import TYPE_CHECKING
1313

1414
from cuda.core._context import Context, ContextOptions
1515
from cuda.core._event import Event, EventOptions
@@ -1217,7 +1217,7 @@ class Device:
12171217
def __reduce__(self):
12181218
return Device, (self.device_id,)
12191219

1220-
def set_current(self, ctx: Context = None) -> Union[Context, None]:
1220+
def set_current(self, ctx: Context = None) -> Context | None:
12211221
"""Set device to be used for GPU executions.
12221222

12231223
Initializes CUDA and sets the calling thread to a valid CUDA
@@ -1233,7 +1233,7 @@ class Device:
12331233

12341234
Returns
12351235
-------
1236-
Union[:obj:`~_context.Context`, None], optional
1236+
:obj:`~_context.Context`, optional
12371237
Popped context.
12381238

12391239
Examples

0 commit comments

Comments
 (0)