Skip to content

Commit 853e775

Browse files
authored
maint: remove extra / in doctest (#330)
* remove extra / * use Path instead of strs for path construction * update docstring to url
1 parent 8a4faf1 commit 853e775

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pins/boards.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ def pin_meta(self, name, version: str = None) -> Meta:
133133
# ensure pin and version exist
134134
if not self.fs.exists(self.construct_path([pin_name, version])):
135135
raise PinsError(
136-
f"Pin {name} either does not exist, "
137-
f"or is missing version: {version}."
136+
f"Pin {name} either does not exist, or is missing version: {version}."
138137
)
139138

140139
selected_version = guess_version(version)
@@ -881,9 +880,10 @@ class BoardManual(BaseBoard):
881880
--------
882881
>>> import fsspec
883882
>>> import os
884-
>>> fs = fsspec.filesystem("github", org = "rstudio", repo = "pins-python")
883+
>>> fs = fsspec.filesystem("http", block_size=0)
885884
>>> pin_paths = {"df_csv": "df_csv/20220214T163720Z-9bfad/"}
886-
>>> board = BoardManual("pins/tests/pins-compat", fs, pin_paths=pin_paths)
885+
>>> url = "https://raw.githubusercontent.com/rstudio/pins-python/main/pins/tests/pins-compat"
886+
>>> board = BoardManual(url, fs, pin_paths=pin_paths)
887887
888888
>>> board.pin_list()
889889
['df_csv']
@@ -984,7 +984,6 @@ def construct_path(self, elements):
984984
return "/".join(pre_components + [pin_path])
985985
elif len(others) == 2:
986986
version, meta = others
987-
988987
return "/".join(pre_components + [stripped, meta])
989988

990989
raise NotImplementedError(

0 commit comments

Comments
 (0)