Skip to content

Commit aad78d5

Browse files
[pre-commit.ci] pre-commit autoupdate (#666)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](astral-sh/ruff-pre-commit@v0.2.2...v0.3.2) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](pre-commit/mirrors-mypy@v1.8.0...v1.9.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 4d365f6 commit aad78d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+116
-194
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ repos:
2323
)$
2424
- id: check-merge-conflict
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: v0.2.2
26+
rev: v0.3.2
2727
hooks:
2828
- id: ruff
2929
args: ["--fix", "--output-format=full"]
3030
- id: ruff-format
3131
- repo: https://github.com/pre-commit/mirrors-mypy
32-
rev: v1.8.0
32+
rev: v1.9.0
3333
hooks:
3434
- id: mypy
3535
language: python

pytensor/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
1919
"""
2020

21-
2221
__docformat__ = "restructuredtext en"
2322

2423
# Set a default logger. It is important to do this before importing some other

pytensor/compile/builders.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Define new Ops from existing Ops"""
2+
23
from collections import OrderedDict
34
from collections.abc import Sequence
45
from copy import copy

pytensor/compile/compiledir.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
This module contains housekeeping functions for cleaning/purging the "compiledir".
33
It is used by the "pytensor-cache" CLI tool, located in the /bin folder of the repository.
44
"""
5+
56
import logging
67
import os
78
import pickle

pytensor/compile/compilelock.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Locking mechanism to ensure no two compilations occur simultaneously
33
in the same compilation directory (which can cause crashes).
44
"""
5+
56
import os
67
import threading
78
from contextlib import contextmanager

pytensor/compile/debugmode.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
66
"""
77

8-
98
import copy
109
import gc
1110
import logging
@@ -2317,10 +2316,7 @@ def __init__(
23172316
raise ValueError("DebugMode has to check at least one of c and py code")
23182317

23192318
def __str__(self):
2320-
return "DebugMode(linker={}, optimizer={})".format(
2321-
self.provided_linker,
2322-
self.provided_optimizer,
2323-
)
2319+
return f"DebugMode(linker={self.provided_linker}, optimizer={self.provided_optimizer})"
23242320

23252321

23262322
register_mode("DEBUG_MODE", DebugMode(optimizer="fast_run"))

pytensor/compile/function/pfunc.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ def rebuild_collect_shared(
3535
list[Variable],
3636
list[SharedVariable],
3737
],
38-
]:
39-
...
38+
]: ...
4039

4140

4241
@overload
@@ -58,8 +57,7 @@ def rebuild_collect_shared(
5857
list[Variable],
5958
list[SharedVariable],
6059
],
61-
]:
62-
...
60+
]: ...
6361

6462

6563
@overload
@@ -81,8 +79,7 @@ def rebuild_collect_shared(
8179
list[Variable],
8280
list[SharedVariable],
8381
],
84-
]:
85-
...
82+
]: ...
8683

8784

8885
@overload
@@ -104,8 +101,7 @@ def rebuild_collect_shared(
104101
list[Variable],
105102
list[SharedVariable],
106103
],
107-
]:
108-
...
104+
]: ...
109105

110106

111107
def rebuild_collect_shared(

pytensor/compile/io.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
"""
55

6-
76
import logging
87

98
from pytensor.link.basic import Container

pytensor/d3viz/d3viz.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Author: Christof Angermueller <[email protected]>
44
"""
55

6-
76
import json
87
import os
98
import shutil

pytensor/d3viz/formatting.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
Author: Christof Angermueller <[email protected]>
44
"""
5+
56
import os
67
from functools import reduce
78

0 commit comments

Comments
 (0)