Skip to content

Commit

Permalink
black linter
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Feb 9, 2024
1 parent 86d8232 commit fe2cfb6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -2569,15 +2569,17 @@ def move_version(self, version, after=None, position=None):
base_url = self.resource_url("version")
url = "{base_url}/{version}/move".format(base_url=base_url, version=version)
if after is None and position is None:
raise ValueError('Must provide one of `after` or `position`')
raise ValueError("Must provide one of `after` or `position`")
if after:
after_url = self.get_version(after).get('self')
return self.post(url, data={'after': after_url})
after_url = self.get_version(after).get("self")
return self.post(url, data={"after": after_url})
if position:
position = position.lower().capitalize()
if position not in ['Earlier', 'Later', 'First', 'Last']:
raise ValueError('position must be one of Earlier, Later, First, or Last. Got {pos}'.format(pos=position))
return self.post(url, data={'position': position})
if position not in ["Earlier", "Later", "First", "Last"]:
raise ValueError(
"position must be one of Earlier, Later, First, or Last. Got {pos}".format(pos=position)
)
return self.post(url, data={"position": position})

def get_project_roles(self, project_key):
"""
Expand Down

0 comments on commit fe2cfb6

Please sign in to comment.