This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-3-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 4e43f976a3a007c9d167352b726191478d91edcd Author: Kaxil Naik <[email protected]> AuthorDate: Thu Jun 23 13:57:36 2022 +0100 Fix usage of `click.get_terminal_size()` (#24616) We were ignoring mypy error instead of fixing it. click had removed `get_terminal_size` and recommend using `shutil.get_terminal_size` (cherry picked from commit 5f67cc0747ea661b703e4c44c77e7cd005cb9588) --- dev/send_email.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/send_email.py b/dev/send_email.py index 2d796eb800..1ec2199a9c 100755 --- a/dev/send_email.py +++ b/dev/send_email.py @@ -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 @@ -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")
