Skip to content

Commit 64bb6eb

Browse files
committed
refactor: change name to board_deparse
1 parent 3798e25 commit 64bb6eb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pins/constructors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class DEFAULT:
1313

1414
# Representing constructors ===================================================
1515

16-
17-
def deparse_board(board: BaseBoard):
16+
# Note that this is not a constructor, but a function to represent them.
17+
def board_deparse(board: BaseBoard):
1818
"""Return a representation of how a board could be reconstructed.
1919
2020
Note that this function does not try to represent the exact arguments used
@@ -31,7 +31,7 @@ def deparse_board(board: BaseBoard):
3131
3232
The example below deparses a board connected to RStudio Connect.
3333
34-
>>> deparse_board(board_rsconnect(server_url="http://example.com", api_key="xxx"))
34+
>>> board_deparse(board_rsconnect(server_url="http://example.com", api_key="xxx"))
3535
"board_rsconnect(server_url='http://example.com')"
3636
3737
Note that the deparsing an RStudio Connect board does not keep the api_key,
@@ -40,7 +40,7 @@ def deparse_board(board: BaseBoard):
4040
4141
Below is an example of representing a board connected to a local folder.
4242
43-
>>> deparse_board(board_folder("a/b/c"))
43+
>>> board_deparse(board_folder("a/b/c"))
4444
"board_folder('a/b/c')"
4545
"""
4646

pins/tests/test_constructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,5 @@ def test_board_deparse(board):
203203
if prot == "rsc":
204204
os.environ["CONNECT_API_KEY"] = board.fs.api.api_key
205205

206-
new_board = eval(c.deparse_board(board), c.__dict__)
206+
new_board = eval(c.board_deparse(board), c.__dict__)
207207
new_board.pin_list()

0 commit comments

Comments
 (0)