Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-21024: Edit DbAuth docstring syntax #186

Merged
merged 1 commit into from
Aug 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 14 additions & 14 deletions python/lsst/daf/butler/core/dbAuth.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,29 +125,29 @@ def getAuth(self, drivername, username, host, port, database):
the database connection URL, the dictionary must also contain a
``username`` item.

Glob-style patterns (using "*" and "?" as wildcards) can be used to
match the host and database name portions of the connection URL. For
the username, port, and database name portions, omitting them from the
pattern matches against any value in the connection URL.
Glob-style patterns (using "``*``" and "``?``" as wildcards) can be
used to match the host and database name portions of the connection
URL. For the username, port, and database name portions, omitting them
from the pattern matches against any value in the connection URL.

Examples
--------

The connection URL
"postgresql://user@host.example.com:5432/my_database" matches against
``postgresql://user@host.example.com:5432/my_database`` matches against
the identical string as a pattern. Other patterns that would match
include:

* "postgresql://*"
* "postgresql://*.example.com"
* "postgresql://*.example.com/my_*"
* "postgresql://host.example.com/my_database"
* "postgresql://host.example.com:5432/my_database"
* "postgresql://user@host.example.com/my_database"
* ``postgresql://*``
* ``postgresql://*.example.com``
* ``postgresql://*.example.com/my_*``
* ``postgresql://host.example.com/my_database``
* ``postgresql://host.example.com:5432/my_database``
* ``postgresql://user@host.example.com/my_database``

Note that the connection URL
"postgresql://host.example.com/my_database" would not match against
the pattern "postgresql://host.example.com:5432", even if the default
``postgresql://host.example.com/my_database`` would not match against
the pattern ``postgresql://host.example.com:5432``, even if the default
port for the connection is 5432.
"""
if drivername is None or drivername == "":
Expand Down Expand Up @@ -238,7 +238,7 @@ def getUrl(self, url):

See also
--------
`getAuth`
getAuth
"""
components = urllib.parse.urlparse(url)
username, password = self.getAuth(
Expand Down