Skip to content

Commit 5546854

Browse files
authored
docs: Remove random string in examples, fix quotes (#428)
The string isn't actually an issue (since it's made up), but it was caught in [secret scanning](https://github.com/posit-dev/posit-sdk-py/security/secret-scanning/2). IMO it's nice(r) to be explicit about what one puts there (hence `{your API key}` rather than a random string that could (in shape at least) be an API key, but have the person figure out that's the thing that goes there. I also fixed up some really wonky quotes. They were in comments so I'm not surprised nothing complained about this, but the lacking a quote and then one having double was really strange!
1 parent 77c729e commit 5546854

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/posit/connect/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def __init__(self, url: str, api_key: str) -> None:
121121
122122
Examples
123123
--------
124-
>>> Client("https://connect.example.com", abcdefghijklmnopqrstuvwxyz012345")
124+
>>> Client("https://connect.example.com", os.getenv("CONNECT_API_KEY"))
125125
"""
126126

127127
def __init__(self, *args, **kwargs) -> None:
@@ -152,8 +152,8 @@ def __init__(self, *args, **kwargs) -> None:
152152
--------
153153
>>> Client()
154154
>>> Client("https://connect.example.com")
155-
>>> Client("https://connect.example.com", abcdefghijklmnopqrstuvwxyz012345")
156-
>>> Client(api_key=""abcdefghijklmnopqrstuvwxyz012345", url="https://connect.example.com")
155+
>>> Client("https://connect.example.com", os.getenv("CONNECT_API_KEY"))
156+
>>> Client(api_key=os.getenv("CONNECT_API_KEY"), url="https://connect.example.com")
157157
"""
158158
api_key = None
159159
url = None

0 commit comments

Comments
 (0)