Skip to content

Commit

Permalink
Fix usage of click.get_terminal_size() (#24616)
Browse files Browse the repository at this point in the history
We were ignoring mypy error instead of fixing it.

click had removed `get_terminal_size` and recommend using `shutil.get_terminal_size`
  • Loading branch information
kaxil authored Jun 23, 2022
1 parent 0905e38 commit 5f67cc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dev/send_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# This tool is based on the Superset send_email script:
# https://github.com/apache/incubator-superset/blob/master/RELEASING/send_email.py
import os
import shutil
import smtplib
import ssl
import sys
Expand Down Expand Up @@ -83,7 +84,7 @@ def show_message(entity: str, message: str):
"""
Show message on the Command Line
"""
width, _ = click.get_terminal_size() # type: ignore[attr-defined]
width, _ = shutil.get_terminal_size()
click.secho("-" * width, fg="blue")
click.secho(f"{entity} Message:", fg="bright_red", bold=True)
click.secho("-" * width, fg="blue")
Expand Down

0 comments on commit 5f67cc0

Please sign in to comment.