Skip to content

Commit fe0c91c

Browse files
[pre-commit.ci] pre-commit autoupdate (#573)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tobias Raabe <[email protected]>
1 parent 0e14ff2 commit fe0c91c

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

.github/workflows/main.yml

-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ concurrency:
55
group: ${{ github.head_ref || github.run_id }}
66
cancel-in-progress: true
77

8-
env:
9-
CONDA_EXE: mamba
10-
118
on:
129
push:
1310
branches:

.pre-commit-config.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ repos:
3333
hooks:
3434
- id: sort-all
3535
- repo: https://github.com/astral-sh/ruff-pre-commit
36-
rev: v0.3.1
36+
rev: v0.3.2
3737
hooks:
3838
- id: ruff-format
3939
- id: ruff
4040
args: [--unsafe-fixes]
4141
- repo: https://github.com/dosisod/refurb
42-
rev: v1.28.0
42+
rev: v2.0.0
4343
hooks:
4444
- id: refurb
4545
args: [--ignore, FURB126]
4646
- repo: https://github.com/pre-commit/mirrors-mypy
47-
rev: v1.8.0
47+
rev: v1.9.0
4848
hooks:
4949
- id: mypy
5050
additional_dependencies: [
@@ -80,8 +80,6 @@ repos:
8080
- repo: https://github.com/nbQA-dev/nbQA
8181
rev: 1.8.4
8282
hooks:
83-
- id: nbqa-black
84-
- id: nbqa-isort
8583
- id: nbqa-mypy
8684
args: [--ignore-missing-imports]
8785
- repo: https://github.com/kynan/nbstripout

src/_pytask/_hashlib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,5 +232,5 @@ def hash_value(value: Any) -> int | str:
232232
if isinstance(value, str):
233233
value = value.encode()
234234
if isinstance(value, bytes):
235-
return str(hashlib.sha256(value).hexdigest())
235+
return hashlib.sha256(value).hexdigest()
236236
return hash(value)

src/_pytask/data_catalog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def add(self, name: str, node: PNode | None = None) -> None:
9999
raise TypeError(msg)
100100

101101
if node is None:
102-
filename = str(hashlib.sha256(name.encode()).hexdigest())
102+
filename = hashlib.sha256(name.encode()).hexdigest()
103103
if isinstance(self.default_node, PPathNode):
104104
self.entries[name] = self.default_node(
105105
name=name, path=self.path / f"{filename}.pkl"

tests/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class SysPathsSnapshot:
5555
"""A snapshot for sys.path."""
5656

5757
def __init__(self) -> None:
58-
self.__saved = list(sys.path), list(sys.meta_path)
58+
self.__saved = sys.path.copy(), sys.meta_path.copy()
5959

6060
def restore(self) -> None:
6161
sys.path[:], sys.meta_path[:] = self.__saved
@@ -65,7 +65,7 @@ class SysModulesSnapshot:
6565
"""A snapshot for sys.modules."""
6666

6767
def __init__(self) -> None:
68-
self.__saved = dict(sys.modules)
68+
self.__saved = sys.modules.copy()
6969

7070
def restore(self) -> None:
7171
sys.modules.clear()

0 commit comments

Comments
 (0)