Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Mar 9, 2022
1 parent 546571f commit aa80a35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions pyarr/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def get_quality_profile(self, id_=None):
Returns:
JSON: Array
"""
path = "qualityprofile" if not id_ else f"qualityprofile/{id_}"
path = f"qualityprofile/{id_}" if id_ else "qualityprofile"
return self.request_get(path, self.ver_uri)

# PUT /qualityprofile/{id}
Expand Down Expand Up @@ -303,7 +303,7 @@ def get_quality_definition(self, id_=None):
Returns:
JSON: Array
"""
path = "qualitydefinition" if not id_ else f"qualitydefinition/{id_}"
path = f"qualitydefinition/{id_}" if id_ else "qualitydefinition"
return self.request_get(path, self.ver_uri)

# PUT /qualitydefinition/{id}
Expand Down Expand Up @@ -335,7 +335,7 @@ def get_indexer(self, id_=None):
Returns:
JSON: Array
"""
path = "indexer" if not id_ else f"indexer/{id_}"
path = f"indexer/{id_}" if id_ else "indexer"
return self.request_get(path, self.ver_uri)

# PUT /indexer/{id}
Expand Down Expand Up @@ -558,7 +558,7 @@ def get_tag(self, id_=None):
Returns:
JSON: Array
"""
path = "tag" if not id_ else f"tag/{id_}"
path = f"tag/{id_}" if id_ else "tag"
return self.request_get(path, self.ver_uri)

# GET /tag/detail/{id}
Expand All @@ -571,7 +571,7 @@ def get_tag_detail(self, id_=None):
Returns:
JSON: Array
"""
path = "tag/detail" if not id_ else f"tag/detail/{id_}"
path = f"tag/detail/{id_}" if id_ else "tag/detail"
return self.request_get(path, self.ver_uri)

# POST /tag
Expand Down Expand Up @@ -631,7 +631,7 @@ def get_download_client(self, id_=None):
Returns:
JSON: Array
"""
path = "downloadclient" if not id_ else f"downloadclient/{id_}"
path = f"downloadclient/{id_}" if id_ else "downloadclient"
return self.request_get(path, self.ver_uri)

# GET /downloadclient/schema
Expand Down Expand Up @@ -708,7 +708,7 @@ def get_import_list(self, id_=None):
Returns:
JSON: Array
"""
path = "importlist" if not id_ else f"importlist/{id_}"
path = f"importlist/{id_}" if id_ else "importlist"
return self.request_get(path, self.ver_uri)

# POST /importlist/
Expand Down
2 changes: 1 addition & 1 deletion pyarr/lidarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def get_metadata_profile(self, id_: Union[int, None] = None):
Returns:
JSON: Array
"""
_path = "" if not id_ else f"/{id_}"
_path = f"/{id_}" if id_ else ""
return self.request_get(f"metadataprofile{_path}", self.ver_uri)

# POST /metadataprofile
Expand Down

0 comments on commit aa80a35

Please sign in to comment.