diff --git a/jupyter_server/auth/security.py b/jupyter_server/auth/security.py index a5ae185f1e..ede64db522 100644 --- a/jupyter_server/auth/security.py +++ b/jupyter_server/auth/security.py @@ -41,7 +41,7 @@ def passwd(passphrase=None, algorithm="argon2"): Examples -------- - >>> passwd('mypassword') # doctest: +ELLIPSIS + >>> passwd("mypassword") # doctest: +ELLIPSIS 'argon2:...' """ @@ -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:"): diff --git a/jupyter_server/utils.py b/jupyter_server/utils.py index 2a4c185d97..968d1fd27c 100644 --- a/jupyter_server/utils.py +++ b/jupyter_server/utils.py @@ -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.