Skip to content

Commit

Permalink
PEP8: jira cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed May 7, 2019
1 parent 7aad525 commit ca3d416
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bugwarrior/services/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import logging
log = logging.getLogger(__name__)


# The below `ObliviousCookieJar` and `JIRA` classes are MIT Licensed.
# They were taken from this wonderful commit by @GaretJax
# https://github.com/GaretJax/lancet/commit/f175cb2ec9a2135fb78188cf0b9f621b51d88977
Expand All @@ -40,6 +41,7 @@ def _create_http_basic_session(self, *args, **kwargs):
def close(self):
self._session.close()


def _parse_sprint_string(sprint):
""" Parse the big ugly sprint string stored by JIRA.
Expand All @@ -52,6 +54,7 @@ def _parse_sprint_string(sprint):
fields = sum((entry.rsplit(',', 1) for entry in entries), [])
return dict(zip(fields[::2], fields[1::2]))


class JiraIssue(Issue):
ISSUE_TYPE = 'jiraissuetype'
SUMMARY = 'jirasummary'
Expand All @@ -61,7 +64,7 @@ class JiraIssue(Issue):
ESTIMATE = 'jiraestimate'
FIX_VERSION = 'jirafixversion'
CREATED_AT = 'jiracreatedts'
STATUS ='jirastatus'
STATUS = 'jirastatus'

UDAS = {
ISSUE_TYPE: {
Expand Down Expand Up @@ -163,7 +166,7 @@ def _get_tags_from_sprints(self):

context = self.record.copy()
label_template = Template(self.origin['label_template'])

sprints = self.__get_sprints()
for sprint in sprints:
# Extract the name and render it into a label
Expand Down Expand Up @@ -252,6 +255,7 @@ def get_status(self):
def get_issue_type(self):
return self.record['fields']['issuetype']['name']


class JiraService(IssueService):
ISSUE_CLASS = JiraIssue
CONFIG_PREFIX = 'jira'
Expand Down

0 comments on commit ca3d416

Please sign in to comment.