Skip to content

Commit 49408c2

Browse files
piiqAyanSinhaMahapatra
authored andcommitted
Fix using incorrect hidden property on ProgressBar instance
Signed-off-by: Theodore Aptekarev <[email protected]> Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
1 parent aba7c1b commit 49408c2

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ jobs:
6868
python_versions: ["3.9", "3.10", "3.11", "3.12", "3.13"]
6969
test_suites:
7070
click_versions: |
71-
for clk_ver in 8.1.7 8.1.6 8.1.5 8.1.4 8.1.3 8.1.2 8.1.1 8.1.0 8.0.4 8.0.2 8.0.3 8.0.1 7.1.2 7.1.1 7.1 6.7;
71+
for clk_ver in 8.2.0 8.2.1;
7272
do
73-
pip install click==$clk_ver;
73+
venv/bin/pip install --force-reinstall click==$clk_ver;
7474
venv/bin/pytest -vvs tests/test_cliutils_progressbar.py;
7575
done
7676

requirements-dev.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
aboutcode-toolkit==7.2.0
1+
aboutcode-toolkit==11.1.1
22
black==23.1.0
33
bleach==6.0.0
44
boolean.py==4.0
55
cffi==1.15.1
66
cryptography==39.0.1
77
docutils==0.19
88
et-xmlfile==1.1.0
9-
exceptiongroup==1.1.0
109
execnet==1.9.0
1110
importlib-metadata==6.0.0
1211
iniconfig==2.0.0
12+
isort==6.0.1
1313
jaraco.classes==3.2.3
1414
jeepney==0.8.0
1515
jinja2==3.1.2
@@ -27,6 +27,7 @@ pathspec==0.11.0
2727
pkginfo==1.9.6
2828
platformdirs==3.0.0
2929
pluggy==1.0.0
30+
pycodestyle==2.13.0
3031
pycparser==2.21
3132
pygments==2.14.0
3233
pytest==7.2.1
@@ -37,7 +38,6 @@ rfc3986==2.0.0
3738
rich==13.3.1
3839
secretstorage==3.3.3
3940
six==1.16.0
40-
tomli==2.0.1
4141
twine==4.0.2
4242
webencodings==0.5.1
4343
zipp==3.14.0

requirements.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
attrs==22.2.0
2-
beautifulsoup4==4.13.3
3-
certifi==2022.12.7
1+
attrs==25.3.0
2+
beautifulsoup4==4.13.4
3+
certifi==2025.4.26
44
chardet==5.2.0
5-
click==8.1.3
6-
idna==3.4
7-
pip==23.0
8-
PyYAML==6.0
9-
requests==2.28.2
10-
saneyaml==0.6.0
11-
setuptools==67.1.0
12-
soupsieve==2.4
5+
charset-normalizer==3.4.2
6+
click==8.2.1
7+
idna==3.10
8+
pip==25.1.1
9+
PyYAML==6.0.2
10+
requests==2.32.2
11+
saneyaml==0.6.1
12+
setuptools==80.3.1
13+
soupsieve==2.7
1314
text-unidecode==1.3
14-
urllib3==1.26.14
15-
wheel==0.38.4
15+
typing_extensions==4.13.2
16+
urllib3==1.26.20

setup.cfg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ python_requires = >=3.9
4242
install_requires =
4343
attrs >= 18.1, !=20.1.0
4444
Beautifulsoup4[chardet] >= 4.13.0
45-
click >= 6.7, !=7.0
45+
click >= 8.2.0
4646
requests[use_chardet_on_py3] >= 2.7.0
4747
saneyaml >= 0.5.2
4848
text_unidecode >= 1.0
@@ -56,7 +56,7 @@ where = src
5656
testing =
5757
pytest >= 6, != 7.0.0
5858
pytest-xdist >= 2
59-
aboutcode-toolkit >= 7.0.2
59+
aboutcode-toolkit >=11.1.1
6060
pycodestyle >= 2.8.0
6161
twine
6262
black
@@ -70,4 +70,3 @@ docs =
7070
sphinx-autobuild
7171
sphinx-rtd-dark-mode>=1.3.0
7272
sphinx-copybutton
73-

src/commoncode/cliutils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def make_step(self, n_steps):
177177
# overriden and copied from Click to work around Click woes for
178178
# https://github.com/aboutcode-org/scancode-toolkit/issues/2583
179179
def generator(self):
180-
if self.is_hidden:
180+
if self.hidden:
181181
yield from self.iter
182182
else:
183183
for rv in self.iter:
@@ -196,7 +196,7 @@ class EnhancedProgressBar(DebuggedProgressBar):
196196
"""
197197

198198
def render_progress(self):
199-
if not self.is_hidden:
199+
if not self.hidden:
200200
return super(EnhancedProgressBar, self).render_progress()
201201

202202

@@ -217,7 +217,7 @@ class ProgressLogger(ProgressBar):
217217

218218
def __init__(self, *args, **kwargs):
219219
super(ProgressLogger, self).__init__(*args, **kwargs)
220-
self.is_hidden = False
220+
self.hidden = False
221221

222222
def render_progress(self):
223223
line = self.format_progress_line()

0 commit comments

Comments
 (0)