Skip to content

Commit 04ae8f4

Browse files
authored
Merge branch 'main' into stubsabot/tqdm
2 parents 1d26e69 + 61af670 commit 04ae8f4

4 files changed

Lines changed: 6 additions & 36 deletions

File tree

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ mypy-protobuf==5.1.0; python_version < "3.15"
1111
packaging==26.2
1212
pathspec>=1.1.1
1313
pre-commit
14+
ruff==0.15.20
1415
# Required by create_baseline_stubs.py.
1516
# stubdefaulter depends on libcst, which does not yet install cleanly on Python 3.15.
16-
ruff==0.15.20
1717
stubdefaulter==0.1.0; python_version < "3.15"
1818
termcolor>=2.3
1919
tomli==2.4.1; python_version < "3.11"
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Cannot import in stubtest
22
tqdm.__main__
33

4-
# TODO: Reenable when tensorflow supports Python 3.13 and is added to the
5-
# stubtest dependencies in METADATA.toml.
6-
tqdm.keras
7-
84
# Fails to import as of v4.68.0 since it attempts to re-export functions that were
95
# removed from 'tqdm.utils' (e.g. _screen_shape_linux).
106
tqdm._utils

stubs/tqdm/METADATA.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
version = "4.70.*"
22
upstream-repository = "https://github.com/tqdm/tqdm"
3-
optional-dependencies = ["types-requests"]
3+
optional-dependencies = ["types-requests", "types-tensorflow"]
44

55
[tool.stubtest]
66
extras = ["slack", "telegram"]
7-
# Add `"tensorflow"` to this list when there's a tensorflow release supporting
8-
# Python 3.13: https://github.com/tensorflow/tensorflow/issues/78774.
9-
# Also remove tqdm.keras from @tests/stubtest_allowlist.txt.
10-
stubtest-dependencies = ["dask", "pandas", "rich"]
7+
stubtest-dependencies = ["dask", "pandas", "rich", "tensorflow"]

stubs/tqdm/tqdm/keras.pyi

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
11
from _typeshed import Incomplete
22

3-
__all__ = ["TqdmCallback"]
3+
from tensorflow import keras
44

5-
# keras.callbacks.Callback
6-
class _Callback:
7-
validation_data: Incomplete | None
8-
model: Incomplete | None
9-
params: Incomplete
10-
def __init__(self) -> None: ...
11-
def set_params(self, params) -> None: ...
12-
def set_model(self, model) -> None: ...
13-
def on_batch_begin(self, batch, logs: Incomplete | None = ...) -> None: ...
14-
def on_batch_end(self, batch, logs: Incomplete | None = ...) -> None: ...
15-
def on_epoch_begin(self, epoch, logs: Incomplete | None = ...) -> None: ...
16-
def on_epoch_end(self, epoch, logs: Incomplete | None = ...) -> None: ...
17-
def on_train_batch_begin(self, batch, logs: Incomplete | None = ...) -> None: ...
18-
def on_train_batch_end(self, batch, logs: Incomplete | None = ...) -> None: ...
19-
def on_test_batch_begin(self, batch, logs: Incomplete | None = ...) -> None: ...
20-
def on_test_batch_end(self, batch, logs: Incomplete | None = ...) -> None: ...
21-
def on_predict_batch_begin(self, batch, logs: Incomplete | None = ...) -> None: ...
22-
def on_predict_batch_end(self, batch, logs: Incomplete | None = ...) -> None: ...
23-
def on_train_begin(self, logs: Incomplete | None = ...) -> None: ...
24-
def on_train_end(self, logs: Incomplete | None = ...) -> None: ...
25-
def on_test_begin(self, logs: Incomplete | None = ...) -> None: ...
26-
def on_test_end(self, logs: Incomplete | None = ...) -> None: ...
27-
def on_predict_begin(self, logs: Incomplete | None = ...) -> None: ...
28-
def on_predict_end(self, logs: Incomplete | None = ...) -> None: ...
5+
__all__ = ["TqdmCallback"]
296

30-
class TqdmCallback(_Callback):
7+
class TqdmCallback(keras.callbacks.Callback):
318
@staticmethod
329
def bar2callback(bar, pop=None, delta=...): ...
3310
tqdm_class: Incomplete

0 commit comments

Comments
 (0)