-
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
11 changed files
with
42 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# https://github.com/python/mypy/issues/1141 | ||
from typing import Dict, Optional, Text | ||
from typing import Dict, Optional | ||
|
||
# Change these values to configure authentication for the plugin | ||
ZULIP_USER = "[email protected]" | ||
|
@@ -19,7 +19,7 @@ | |
# * stream "deployments" | ||
# * topic "master" | ||
# And similarly for branch "test-post-receive" (for use when testing). | ||
def deployment_notice_destination(branch: str) -> Optional[Dict[str, Text]]: | ||
def deployment_notice_destination(branch: str) -> Optional[Dict[str, str]]: | ||
if branch in ["master", "test-post-receive"]: | ||
return dict(stream="deployments", subject="%s" % (branch,)) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from typing import Dict, Optional, Text | ||
from typing import Dict, Optional | ||
|
||
# Change these values to configure authentication for the plugin | ||
ZULIP_USER = "[email protected]" | ||
|
@@ -28,7 +28,7 @@ | |
# "master-plan" and "secret" subdirectories of //depot/ to: | ||
# * stream "depot_subdirectory-commits" | ||
# * subject "change_root" | ||
def commit_notice_destination(path: Text, changelist: int) -> Optional[Dict[Text, Text]]: | ||
def commit_notice_destination(path: str, changelist: int) -> Optional[Dict[str, str]]: | ||
dirs = path.split("/") | ||
if len(dirs) >= 4 and dirs[3] not in ("*", "..."): | ||
directory = dirs[3] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from typing import Dict, Optional, Text | ||
from typing import Dict, Optional | ||
|
||
# Change these values to configure authentication for the plugin | ||
ZULIP_USER = "[email protected]" | ||
|
@@ -18,7 +18,7 @@ | |
# and "my-super-secret-repository" repos to | ||
# * stream "commits" | ||
# * topic "branch_name" | ||
def commit_notice_destination(path: Text, commit: Text) -> Optional[Dict[Text, Text]]: | ||
def commit_notice_destination(path: str, commit: str) -> Optional[Dict[str, str]]: | ||
repo = path.split("/")[-1] | ||
if repo not in ["evil-master-plan", "my-super-secret-repository"]: | ||
return dict(stream="commits", subject="%s" % (repo,)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters