Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 16, 2023
1 parent 7639a9e commit 23f970f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions jupyter_server/auth/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def passwd(passphrase=None, algorithm="argon2"):
Examples
--------
>>> passwd('mypassword') # doctest: +ELLIPSIS
>>> passwd("mypassword") # doctest: +ELLIPSIS
'argon2:...'
"""
Expand Down Expand Up @@ -93,15 +93,14 @@ def passwd_check(hashed_passphrase, passphrase):
Examples
--------
>>> myhash = passwd('mypassword')
>>> passwd_check(myhash, 'mypassword')
>>> myhash = passwd("mypassword")
>>> passwd_check(myhash, "mypassword")
True
>>> passwd_check(myhash, 'otherpassword')
>>> passwd_check(myhash, "otherpassword")
False
>>> passwd_check('sha1:0e112c3ddfce:a68df677475c2b47b6e86d0467eec97ac5f4b85a',
... 'mypassword')
>>> passwd_check("sha1:0e112c3ddfce:a68df677475c2b47b6e86d0467eec97ac5f4b85a", "mypassword")
True
"""
if hashed_passphrase.startswith("argon2:"):
Expand Down
4 changes: 2 additions & 2 deletions jupyter_server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,11 @@ def filefind(filename: str, path_dirs: Sequence[str] | str | None = None) -> str
path dirs is given, the filename is tested as is, after running through
:func:`expandvars` and :func:`expanduser`. Thus a simple call::
filefind('myfile.txt')
filefind("myfile.txt")
will find the file in the current working dir, but::
filefind('~/myfile.txt')
filefind("~/myfile.txt")
Will find the file in the users home directory. This function does not
automatically try any paths, such as the cwd or the user's home directory.
Expand Down

0 comments on commit 23f970f

Please sign in to comment.