Skip to content

Commit

Permalink
use os.path.join instead of hardcoding slash
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Mar 18, 2024
1 parent fad7720 commit 3aa74df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linkml_runtime/linkml_model/linkml_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class _Path(Enum):
RDF = "rdf"
SHEXC = "shex"
SHEXJ = "shex"
YAML = "model/schema"
YAML = os.path.join("model", "schema")

Check warning on line 70 in linkml_runtime/linkml_model/linkml_files.py

View check run for this annotation

Codecov / codecov/patch

linkml_runtime/linkml_model/linkml_files.py#L70

Added line #L70 was not covered by tests


class ReleaseTag(_AutoName):
Expand All @@ -80,7 +80,7 @@ class ReleaseTag(_AutoName):

def _build_path(source: Source, fmt: Format) -> str:
""" Create the relative path for source and fmt """
return f"{_Path[fmt.name].value}/{source.value}.{fmt.value}"
return os.path.join(_Path[fmt.name].value, f"{source.value}.{fmt.value}")

Check warning on line 83 in linkml_runtime/linkml_model/linkml_files.py

View check run for this annotation

Codecov / codecov/patch

linkml_runtime/linkml_model/linkml_files.py#L83

Added line #L83 was not covered by tests


def _build_loc(base: str, source: Source, fmt: Format) -> str:
Expand Down

0 comments on commit 3aa74df

Please sign in to comment.