black: Reformat skipping string normalization.
This commit is contained in:
parent
5580c68ae5
commit
fba21bb00d
178 changed files with 6562 additions and 4469 deletions
|
@ -36,7 +36,8 @@ client = zulip.Client(
|
|||
email=config.ZULIP_USER,
|
||||
site=config.ZULIP_SITE,
|
||||
api_key=config.ZULIP_API_KEY,
|
||||
client="ZulipPerforce/" + __version__) # type: zulip.Client
|
||||
client="ZulipPerforce/" + __version__,
|
||||
) # type: zulip.Client
|
||||
|
||||
try:
|
||||
changelist = int(sys.argv[1]) # type: int
|
||||
|
@ -52,7 +53,9 @@ except ValueError:
|
|||
|
||||
metadata = git_p4.p4_describe(changelist) # type: Dict[str, str]
|
||||
|
||||
destination = config.commit_notice_destination(changeroot, changelist) # type: Optional[Dict[str, str]]
|
||||
destination = config.commit_notice_destination(
|
||||
changeroot, changelist
|
||||
) # type: Optional[Dict[str, str]]
|
||||
|
||||
if destination is None:
|
||||
# Don't forward the notice anywhere
|
||||
|
@ -84,10 +87,8 @@ message = """**{user}** committed revision @{change} to `{path}`.
|
|||
{desc}
|
||||
```
|
||||
""".format(
|
||||
user=metadata["user"],
|
||||
change=change,
|
||||
path=changeroot,
|
||||
desc=metadata["desc"]) # type: str
|
||||
user=metadata["user"], change=change, path=changeroot, desc=metadata["desc"]
|
||||
) # type: str
|
||||
|
||||
message_data = {
|
||||
"type": "stream",
|
||||
|
|
|
@ -37,12 +37,12 @@ def commit_notice_destination(path: Text, changelist: int) -> Optional[Dict[Text
|
|||
directory = dirs[2]
|
||||
|
||||
if directory not in ["evil-master-plan", "my-super-secret-repository"]:
|
||||
return dict(stream = "%s-commits" % (directory,),
|
||||
subject = path)
|
||||
return dict(stream="%s-commits" % (directory,), subject=path)
|
||||
|
||||
# Return None for cases where you don't want a notice sent
|
||||
return None
|
||||
|
||||
|
||||
## If properly installed, the Zulip API should be in your import
|
||||
## path, but if not, set a custom path below
|
||||
ZULIP_API_PATH: Optional[str] = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue