Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel Niebler <[email protected]>
  • Loading branch information
crazyscientist and der-gabe authored Nov 23, 2023
1 parent b9bc537 commit b50d3b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions osctiny/extensions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Attribute(ExtensionBase):
"""
Access attribute namespaces and definitions
"""
base_path = "/attribute/"
base_path = "/attribute"

def list_namespaces(self) -> typing.List[str]:
"""
Expand All @@ -25,7 +25,7 @@ def list_namespaces(self) -> typing.List[str]:
:return: List of namespace names
"""
response = self.osc.request(
url=urljoin(self.osc.url, self.base_path),
url=urljoin(self.osc.url, f"{self.base_path}/"),
method="GET"
)
content = self.osc.get_objectified_xml(response)
Expand All @@ -39,7 +39,7 @@ def get_namespace_meta(self, namespace: str) -> ObjectifiedElement:
:return: Objectified XML element
"""
response = self.osc.request(
url=urljoin(self.osc.url, f"{self.base_path}{namespace}/_meta"),
url=urljoin(self.osc.url, f"{self.base_path}/{namespace}/_meta"),
method="GET"
)
return self.osc.get_objectified_xml(response)
Expand All @@ -52,7 +52,7 @@ def list_attributes(self, namespace: str) -> typing.List[str]:
:return: List of attribute names
"""
response = self.osc.request(
url=urljoin(self.osc.url, self.base_path + namespace),
url=urljoin(self.osc.url, f"{self.base_path}/{namespace}"),
method="GET"
)
content = self.osc.get_objectified_xml(response)
Expand All @@ -67,7 +67,7 @@ def get_attribute_meta(self, namespace: str, name: str) -> ObjectifiedElement:
:return: Objectified XML element
"""
response = self.osc.request(
url=urljoin(self.osc.url, f"{self.base_path}{namespace}/{name}/_meta"),
url=urljoin(self.osc.url, f"{self.base_path}/{namespace}/{name}/_meta"),
method="GET"
)
return self.osc.get_objectified_xml(response)

0 comments on commit b50d3b3

Please sign in to comment.