Skip to content

Commit 8c0039a

Browse files
committed
docs: drop obsolete compat boilerplate from the examples
`from __future__ import annotations` does nothing on the 3.10+ range this package supports, so the examples readers copy from should not carry it. Also removes the now-pointless FA lint selection and the python2-era shebang in examples.py.
1 parent 6e5c634 commit 8c0039a

56 files changed

Lines changed: 1 addition & 121 deletions

Some content is hidden

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

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ sweeps sky blue into fuchsia. The scan bar has no percentage to sweep
8484
unchanging cyan instead.
8585
"""
8686

87-
from __future__ import annotations
88-
8987
import sys
9088
import time
9189

@@ -161,8 +159,6 @@ the bar instead:
161159
```python
162160
"""A build log printing above a progress bar without corrupting it."""
163161

164-
from __future__ import annotations
165-
166162
import time
167163

168164
import progressbar
@@ -202,8 +198,6 @@ thread, and waits for all of them on exit:
202198
```python
203199
"""Two named bars progressing at different rates in one terminal."""
204200

205-
from __future__ import annotations
206-
207201
import sys
208202
import time
209203

@@ -275,8 +269,6 @@ Inside a task, `progressbar.current_task_bar()` hands back that task's
275269
own bar so it can report sub-progress too.
276270
"""
277271

278-
from __future__ import annotations
279-
280272
import sys
281273
import time
282274

@@ -353,8 +345,6 @@ with a counter instead of a percentage:
353345
```python
354346
"""A bar for work whose total is not known up front."""
355347

356-
from __future__ import annotations
357-
358348
import time
359349

360350
import progressbar

docs/examples/howto/colors.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
as a single unchanging color instead.
88
"""
99

10-
from __future__ import annotations
11-
1210
import time
1311

1412
import progressbar

docs/examples/howto/custom_widget.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
current phase instead of showing a percentage.
88
"""
99

10-
from __future__ import annotations
11-
1210
import time
1311

1412
import progressbar

docs/examples/howto/dynamic_messages.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from the same value, to show they behave identically.
77
"""
88

9-
from __future__ import annotations
10-
119
import random
1210
import time
1311

docs/examples/howto/file_transfer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
step than most examples in this set.
99
"""
1010

11-
from __future__ import annotations
12-
1311
import random
1412
import time
1513

docs/examples/howto/iterable_wrapper.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
prefix and want to reuse it as a wrapper.
77
"""
88

9-
from __future__ import annotations
10-
119
import time
1210

1311
import progressbar

docs/examples/howto/logging_integration.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
handler) in a `finally`, since both mutate process-global state.
1111
"""
1212

13-
from __future__ import annotations
14-
1513
import logging
1614
import sys
1715
import time

docs/examples/howto/multibar.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
disappearing -- `remove_finished` defaults to an hour.
1010
"""
1111

12-
from __future__ import annotations
13-
1412
import random
1513
import sys
1614
import time

docs/examples/howto/multibar_line_offset.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
wherever it already is.
88
"""
99

10-
from __future__ import annotations
11-
1210
import random
1311
import time
1412

docs/examples/howto/non_tty.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
stay on screen.
1313
"""
1414

15-
from __future__ import annotations
16-
1715
import time
1816

1917
import progressbar

0 commit comments

Comments
 (0)