diff --git a/tests/conftest.py b/tests/conftest.py index da7d3ccd..11b21b22 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,4 @@ +"""Shared pytest config.""" import sys from tqdm import tqdm from pytest import fixture diff --git a/tests/tests_perf.py b/tests/tests_perf.py index 7c1e3271..6a244fbe 100644 --- a/tests/tests_perf.py +++ b/tests/tests_perf.py @@ -159,7 +159,7 @@ def assert_performance(thresh, name_left, time_left, name_right, time_right): @retry_on_except() -def test_iter_basic_overhead(capsys): +def test_iter_basic_overhead(): """Test overhead of iteration based tqdm""" total = int(1e6) @@ -180,7 +180,7 @@ def test_iter_basic_overhead(capsys): @retry_on_except() -def test_manual_basic_overhead(capsys): +def test_manual_basic_overhead(): """Test overhead of manual tqdm""" total = int(1e6) @@ -211,7 +211,7 @@ def worker(total, blocking=True): @retry_on_except() @patch_lock(thread=True) -def test_lock_args(capsys): +def test_lock_args(): """Test overhead of nonblocking threads""" ThreadPoolExecutor = importorskip('concurrent.futures').ThreadPoolExecutor @@ -234,7 +234,7 @@ def test_lock_args(capsys): @retry_on_except(10) -def test_iter_overhead_hard(capsys): +def test_iter_overhead_hard(): """Test overhead of iteration based tqdm (hard)""" total = int(1e5) @@ -256,7 +256,7 @@ def test_iter_overhead_hard(capsys): @retry_on_except(10) -def test_manual_overhead_hard(capsys): +def test_manual_overhead_hard(): """Test overhead of manual tqdm (hard)""" total = int(1e5) @@ -278,7 +278,7 @@ def test_manual_overhead_hard(capsys): @retry_on_except(10) -def test_iter_overhead_simplebar_hard(capsys): +def test_iter_overhead_simplebar_hard(): """Test overhead of iteration based tqdm vs simple progress bar (hard)""" total = int(1e4) @@ -301,7 +301,7 @@ def test_iter_overhead_simplebar_hard(capsys): @retry_on_except(10) -def test_manual_overhead_simplebar_hard(capsys): +def test_manual_overhead_simplebar_hard(): """Test overhead of manual tqdm vs simple progress bar (hard)""" total = int(1e4) diff --git a/tqdm/notebook.py b/tqdm/notebook.py index 12ec53e5..bcda1050 100644 --- a/tqdm/notebook.py +++ b/tqdm/notebook.py @@ -73,6 +73,7 @@ __all__ = ['tqdm_notebook', 'tnrange', 'tqdm', 'trange'] class TqdmHBox(HBox): + """`ipywidgets.HBox` with a pretty representation""" def _repr_json_(self, pretty=None): if not hasattr(self, "pbar"): return {} @@ -88,7 +89,7 @@ class TqdmHBox(HBox): return super(TqdmHBox, self).__repr__() return self.pbar.format_meter(**self._repr_json_(pretty)) - def _repr_pretty_(self, pp, cycle): + def _repr_pretty_(self, pp, *_, **__): pp.text(self.__repr__(True))