Skip to content

Commit

Permalink
Use collections.abc.Callable instead of typing.Callable (#53)
Browse files Browse the repository at this point in the history
`typing.Callable` has been deprecated since Python 3.9. Switch to
`collections.abc.Callable`. Also switch to `collections.abc.Generator`
and `collections.abc.Iterable`.
  • Loading branch information
KyleFromNVIDIA authored Aug 27, 2024
1 parent 92adb5e commit cca7f87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/rapids_pre_commit_hooks/copyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import os
import re
import warnings
from typing import Callable, Optional, Union
from collections.abc import Callable
from typing import Optional, Union

import git

Expand Down
3 changes: 2 additions & 1 deletion src/rapids_pre_commit_hooks/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import functools
import re
import warnings
from typing import Callable, Generator, Iterable, Optional
from collections.abc import Callable, Generator, Iterable
from typing import Optional

from rich.console import Console
from rich.markup import escape
Expand Down

0 comments on commit cca7f87

Please sign in to comment.