lint: Fix E127 pep8 violations.
Fix pep8: E127 continuation line over-indented for visual indent style issue.
This commit is contained in:
parent
bc9bb4287d
commit
fad4fbc733
|
@ -80,13 +80,13 @@ def main(argv=None):
|
||||||
|
|
||||||
group = optparse.OptionGroup(parser, 'Stream parameters')
|
group = optparse.OptionGroup(parser, 'Stream parameters')
|
||||||
group.add_option('-s', '--stream',
|
group.add_option('-s', '--stream',
|
||||||
dest='stream',
|
dest='stream',
|
||||||
action='store',
|
action='store',
|
||||||
help='Allows the user to specify a stream for the message.')
|
help='Allows the user to specify a stream for the message.')
|
||||||
group.add_option('-S', '--subject',
|
group.add_option('-S', '--subject',
|
||||||
dest='subject',
|
dest='subject',
|
||||||
action='store',
|
action='store',
|
||||||
help='Allows the user to specify a subject for the message.')
|
help='Allows the user to specify a subject for the message.')
|
||||||
parser.add_option_group(group)
|
parser.add_option_group(group)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -209,9 +209,9 @@ def process_new_events():
|
||||||
# In task queries, Asana only exposes IDs for projects and users, so we need
|
# In task queries, Asana only exposes IDs for projects and users, so we need
|
||||||
# to look up the mappings.
|
# to look up the mappings.
|
||||||
projects = dict((elt["id"], elt["name"]) for elt in \
|
projects = dict((elt["id"], elt["name"]) for elt in \
|
||||||
fetch_from_asana("/projects")["data"])
|
fetch_from_asana("/projects")["data"])
|
||||||
users = dict((elt["id"], elt["name"]) for elt in \
|
users = dict((elt["id"], elt["name"]) for elt in \
|
||||||
fetch_from_asana("/users")["data"])
|
fetch_from_asana("/users")["data"])
|
||||||
|
|
||||||
cutoff = since()
|
cutoff = since()
|
||||||
max_timestamp_processed = cutoff
|
max_timestamp_processed = cutoff
|
||||||
|
|
|
@ -75,11 +75,11 @@ while len(json_implementations):
|
||||||
|
|
||||||
def make_api_call(path):
|
def make_api_call(path):
|
||||||
response = requests.get("https://api3.codebasehq.com/%s" % (path,),
|
response = requests.get("https://api3.codebasehq.com/%s" % (path,),
|
||||||
auth=(config.CODEBASE_API_USERNAME, config.CODEBASE_API_KEY),
|
auth=(config.CODEBASE_API_USERNAME, config.CODEBASE_API_KEY),
|
||||||
params={'raw': True},
|
params={'raw': True},
|
||||||
headers = {"User-Agent": user_agent,
|
headers = {"User-Agent": user_agent,
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Accept": "application/json"})
|
"Accept": "application/json"})
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
return json.loads(response.text)
|
return json.loads(response.text)
|
||||||
|
|
||||||
|
@ -136,8 +136,8 @@ def handle_event(event):
|
||||||
else:
|
else:
|
||||||
if new_ref:
|
if new_ref:
|
||||||
branch = "new branch %s" % (branch,)
|
branch = "new branch %s" % (branch,)
|
||||||
content = "%s pushed %s commit(s) to %s in project %s:\n\n" % \
|
content = ("%s pushed %s commit(s) to %s in project %s:\n\n" %
|
||||||
(actor_name, num_commits, branch, project)
|
(actor_name, num_commits, branch, project))
|
||||||
for commit in raw_props.get('commits'):
|
for commit in raw_props.get('commits'):
|
||||||
ref = commit.get('ref')
|
ref = commit.get('ref')
|
||||||
url = make_url("projects/%s/repositories/%s/commit/%s" % (project_link, repo_link, ref))
|
url = make_url("projects/%s/repositories/%s/commit/%s" % (project_link, repo_link, ref))
|
||||||
|
@ -155,8 +155,8 @@ def handle_event(event):
|
||||||
if assignee is None:
|
if assignee is None:
|
||||||
assignee = "no one"
|
assignee = "no one"
|
||||||
subject = "#%s: %s" % (num, name)
|
subject = "#%s: %s" % (num, name)
|
||||||
content = """%s created a new ticket [#%s](%s) priority **%s** assigned to %s:\n\n~~~ quote\n %s""" % \
|
content = ("""%s created a new ticket [#%s](%s) priority **%s** assigned to %s:\n\n~~~ quote\n %s""" %
|
||||||
(actor_name, num, url, priority, assignee, name)
|
(actor_name, num, url, priority, assignee, name))
|
||||||
elif event_type == 'ticketing_note':
|
elif event_type == 'ticketing_note':
|
||||||
stream = config.ZULIP_TICKETS_STREAM_NAME
|
stream = config.ZULIP_TICKETS_STREAM_NAME
|
||||||
|
|
||||||
|
@ -229,8 +229,8 @@ def handle_event(event):
|
||||||
|
|
||||||
subject = "Deployment to %s" % (environment,)
|
subject = "Deployment to %s" % (environment,)
|
||||||
|
|
||||||
content = "%s deployed [%s](%s) [through](%s) [%s](%s) to the **%s** environment." % \
|
content = ("%s deployed [%s](%s) [through](%s) [%s](%s) to the **%s** environment." %
|
||||||
(actor_name, start_ref, start_ref_url, between_url, end_ref, end_ref_url, environment)
|
(actor_name, start_ref, start_ref_url, between_url, end_ref, end_ref_url, environment))
|
||||||
if servers is not None:
|
if servers is not None:
|
||||||
content += "\n\nServers deployed to: %s" % (", ".join(["`%s`" % (server,) for server in servers]))
|
content += "\n\nServers deployed to: %s" % (", ".join(["`%s`" % (server,) for server in servers]))
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ def p4_has_command(cmd):
|
||||||
command does not exist in this version of p4."""
|
command does not exist in this version of p4."""
|
||||||
real_cmd = p4_build_cmd(["help", cmd])
|
real_cmd = p4_build_cmd(["help", cmd])
|
||||||
p = subprocess.Popen(real_cmd, stdout=subprocess.PIPE,
|
p = subprocess.Popen(real_cmd, stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE)
|
stderr=subprocess.PIPE)
|
||||||
p.communicate()
|
p.communicate()
|
||||||
return p.returncode == 0
|
return p.returncode == 0
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ def parseRevision(ref):
|
||||||
|
|
||||||
def branchExists(ref):
|
def branchExists(ref):
|
||||||
rev = read_pipe(["git", "rev-parse", "-q", "--verify", ref],
|
rev = read_pipe(["git", "rev-parse", "-q", "--verify", ref],
|
||||||
ignore_error=True)
|
ignore_error=True)
|
||||||
return len(rev) > 0
|
return len(rev) > 0
|
||||||
|
|
||||||
def extractLogMessageFromGitCommit(commit):
|
def extractLogMessageFromGitCommit(commit):
|
||||||
|
@ -1714,7 +1714,7 @@ class P4Submit(Command, P4UserMap):
|
||||||
if self.conflict_behavior == "ask":
|
if self.conflict_behavior == "ask":
|
||||||
print("What do you want to do?")
|
print("What do you want to do?")
|
||||||
response = input("[s]kip this commit but apply"
|
response = input("[s]kip this commit but apply"
|
||||||
" the rest, or [q]uit? ")
|
" the rest, or [q]uit? ")
|
||||||
if not response:
|
if not response:
|
||||||
continue
|
continue
|
||||||
elif self.conflict_behavior == "skip":
|
elif self.conflict_behavior == "skip":
|
||||||
|
@ -2301,7 +2301,7 @@ class P4Sync(Command, P4UserMap):
|
||||||
print("Change %s is labelled %s" % (change, labelDetails))
|
print("Change %s is labelled %s" % (change, labelDetails))
|
||||||
|
|
||||||
files = p4CmdList(["files"] + ["%s...@%s" % (p, change)
|
files = p4CmdList(["files"] + ["%s...@%s" % (p, change)
|
||||||
for p in self.branchPrefixes])
|
for p in self.branchPrefixes])
|
||||||
|
|
||||||
if len(files) == len(labelRevisions):
|
if len(files) == len(labelRevisions):
|
||||||
|
|
||||||
|
@ -2339,8 +2339,8 @@ class P4Sync(Command, P4UserMap):
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print("Querying files for label %s" % label)
|
print("Querying files for label %s" % label)
|
||||||
for file in p4CmdList(["files"] +
|
for file in p4CmdList(["files"] +
|
||||||
["%s...@%s" % (p, label)
|
["%s...@%s" % (p, label)
|
||||||
for p in self.depotPaths]):
|
for p in self.depotPaths]):
|
||||||
revisions[file["depotFile"]] = file["rev"]
|
revisions[file["depotFile"]] = file["rev"]
|
||||||
change = int(file["change"])
|
change = int(file["change"])
|
||||||
if change > newestChange:
|
if change > newestChange:
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -42,9 +42,9 @@ package_info = dict(
|
||||||
url='https://www.zulip.com/dist/api/',
|
url='https://www.zulip.com/dist/api/',
|
||||||
packages=['zulip'],
|
packages=['zulip'],
|
||||||
data_files=[('share/zulip/examples', ["examples/zuliprc", "examples/send-message", "examples/subscribe",
|
data_files=[('share/zulip/examples', ["examples/zuliprc", "examples/send-message", "examples/subscribe",
|
||||||
"examples/get-public-streams", "examples/unsubscribe",
|
"examples/get-public-streams", "examples/unsubscribe",
|
||||||
"examples/list-members", "examples/list-subscriptions",
|
"examples/list-members", "examples/list-subscriptions",
|
||||||
"examples/print-messages", "examples/recent-messages"])] + \
|
"examples/print-messages", "examples/recent-messages"])] + \
|
||||||
list(recur_expand('share/zulip', 'integrations/')),
|
list(recur_expand('share/zulip', 'integrations/')),
|
||||||
scripts=["bin/zulip-send"],
|
scripts=["bin/zulip-send"],
|
||||||
) # type: Dict[str, Any]
|
) # type: Dict[str, Any]
|
||||||
|
|
Loading…
Reference in a new issue