Skip to content

Commit

Permalink
Reformat by pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrzcz committed Nov 5, 2013
1 parent c388c6b commit 5b25562
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bugwarrior/services/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import datetime
import requests


class BitbucketService(IssueService):
base_api = 'https://api.bitbucket.org/1.0'
base_url = 'http://bitbucket.org/'
Expand All @@ -28,7 +29,7 @@ def __init__(self, *args, **kw):
username = self.config.get(self.target, 'username')
service = "bitbucket://%s@bitbucket.org/%s" % (login, username)
password = get_service_password(service, login, oracle=password,
interactive=self.config.interactive)
interactive=self.config.interactive)

self.auth = (login, password)

Expand All @@ -50,7 +51,7 @@ def pull(self, tag):
def annotations(self, tag, issue):
url = self.base_api + '/repositories/%s/issues/%i/comments' % (
tag, issue['local_id'])
response = _getter(url, auth = self.auth)
response = _getter(url, auth=self.auth)
_parse = lambda s: datetime.datetime.strptime(s[:10], "%Y-%m-%d")
return dict([
self.format_annotation(
Expand Down Expand Up @@ -101,6 +102,7 @@ def issues(self):
**self.annotations(tag, issue)
) for tag, issue in issues]


def _getter(url, auth):
response = requests.get(url, auth=auth)

Expand Down

0 comments on commit 5b25562

Please sign in to comment.