pyupgrade: Replace Text with str.

We uses `pyupgrade --py3-plus` to automatically replace all occurence
of `Text`. But manual fix is required to remove the unused imports. Note
that with this configuration pyupgrade also convert string literals to
.format(...) style, which is manually not included in the commit as well.
This commit is contained in:
PIG208 2021-05-28 19:13:13 +08:00 committed by Tim Abbott
parent a54cccc012
commit e27ac0ddbe
11 changed files with 42 additions and 46 deletions

View file

@ -13,7 +13,6 @@ import os
import os.path
import subprocess
import sys
from typing import Text
sys.path.insert(0, os.path.dirname(__file__))
import zulip_git_config as config
@ -33,7 +32,7 @@ client = zulip.Client(
)
def git_repository_name() -> Text:
def git_repository_name() -> str:
output = subprocess.check_output(["git", "rev-parse", "--is-bare-repository"])
if output.strip() == "true":
return os.path.basename(os.getcwd())[: -len(".git")]