Skip to content

Commit 7e43b47

Browse files
committed
Run pre-commit fixes (end-of-file, license header, ruff fixes, etc.)
1 parent d8fea6e commit 7e43b47

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

pymc/sampling/mcmc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
import logging
1919
import pickle
2020
import sys
21+
import threading
2122
import time
2223
import warnings
23-
import threading
2424

2525
from collections.abc import Callable, Iterator, Mapping, Sequence
2626
from typing import (
@@ -103,7 +103,7 @@ def __init__(self, target, args=None, kwargs=None):
103103
def runner():
104104
try:
105105
self._result = target(*args, **kwargs)
106-
except Exception as exc: # noqa: BLE001
106+
except Exception as exc:
107107
self._exception = exc
108108
finally:
109109
self._done.set()
@@ -1773,4 +1773,4 @@ def model_logp_fn(ip: PointType) -> np.ndarray:
17731773
for initial_point in initial_points
17741774
]
17751775

1776-
return initial_points, step
1776+
return initial_points, step

tests/sampling/test_background_sampling.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
import pymc as pm
1+
# Copyright 2025 - present The PyMC Developers
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
214
import pytest
315

16+
import pymc as pm
17+
418

519
def test_background_sampling_happy_path():
620
with pm.Model():
@@ -30,4 +44,4 @@ def test_background_sampling_raises():
3044
progressbar=False,
3145
)
3246
with pytest.raises(Exception):
33-
handle.result()
47+
handle.result()

0 commit comments

Comments
 (0)