Skip to content
Myr

🐛 Fix import of `get_terminal_size` for click 8.1.0 support and upgrade Black for CI (#380)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastián Ramírez · committed by GitHub · parent 6d8e954 · Browse files · 4 files+10 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Michael Adkins <michael@prefect.io>

Diff stats

4 files+10 added−5 removed

  • tests:+6 added−2 removed
  • other:+4 added−3 removed

4 files+10 added−5 removed

modified:docs_src/commands/callback/tutorial004.py+1 added-1 removed
7 unmodified lines
8 """9 Manage users CLI app.1011 Use it with the create command.12 1213 A new user with the given NAME will be created.14 """1516
7 unmodified lines
modified:tests/test_completion/test_completion_install.py+6 added-2 removed
97 unmodified lines
9899100def test_completion_install_fish():101 script_path = Path(mod.__file__)102 completion_path: Path = Path.home() / f".config/fish/completions/{script_path.name}.fish"102 completion_path: Path = (103 Path.home() / f".config/fish/completions/{script_path.name}.fish"104 )105 result = subprocess.run(106 ["coverage", "run", mod.__file__, "--install-completion", "fish"],107 stdout=subprocess.PIPE,108 stderr=subprocess.PIPE,
16 unmodified lines
125app.command()(mod.main)126127128def test_completion_install_powershell():129 completion_path: Path = (127 completion_path: Path = Path.home() / f".config/powershell/Microsoft.PowerShell_profile.ps1"130 Path.home() / f".config/powershell/Microsoft.PowerShell_profile.ps1"131 )132 completion_path_bytes = f"{completion_path}\n".encode("windows-1252")133 text = ""134 if completion_path.is_file(): # pragma: nocover135 text = completion_path.read_text()
22 unmodified lines
modified:typer/__init__.py+2 added-1 removed
1"""Typer, build great CLIs. Easy to code. Based on Python type hints."""23__version__ = "0.4.0"45from shutil import get_terminal_size as get_terminal_size67from click.exceptions import Abort as Abort8from click.exceptions import BadParameter as BadParameter9from click.exceptions import Exit as Exit10from click.termui import clear as clear11from click.termui import confirm as confirm12from click.termui import echo_via_pager as echo_via_pager13from click.termui import edit as edit12from click.termui import get_terminal_size as get_terminal_size14from click.termui import getchar as getchar15from click.termui import launch as launch16from click.termui import pause as pause17from click.termui import progressbar as progressbar
22 unmodified lines
modified:pyproject.toml+1 added-1 removed