diff options
author | David Lord <davidism@gmail.com> | 2022-03-31 13:46:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 13:46:31 -0700 |
commit | 77dd30f8c54ebbdfbf461cedcd3d1fc1d7673f95 (patch) | |
tree | 8fd9ef25219fc753e6dfdac45aa08bcc4ef0adaf | |
parent | a66119abe973f55b4f5e28dbb0da6f3c32c21af7 (diff) | |
parent | b36bf8f9b36ab7db8cf03cd8eff714dfc33f0c29 (diff) | |
download | click-77dd30f8c54ebbdfbf461cedcd3d1fc1d7673f95.tar.gz |
Merge pull request #2237 from pallets/param-order
restore Path param order
-rw-r--r-- | CHANGES.rst | 3 | ||||
-rw-r--r-- | src/click/types.py | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 2c570e2..49be6a6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,9 @@ Unreleased - Fix error message for readable path check that was mixed up with the executable check. :pr:`2236` +- Restore parameter order for ``Path``, placing the ``executable`` + parameter at the end. It is recommended to use keyword arguments + instead of positional arguments. :issue:`2235` Version 8.1.1 diff --git a/src/click/types.py b/src/click/types.py index 2ca4ffb..b45ee53 100644 --- a/src/click/types.py +++ b/src/click/types.py @@ -790,12 +790,12 @@ class Path(ParamType): exists: bool = False, file_okay: bool = True, dir_okay: bool = True, - readable: bool = True, writable: bool = False, - executable: bool = False, + readable: bool = True, resolve_path: bool = False, allow_dash: bool = False, path_type: t.Optional[t.Type] = None, + executable: bool = False, ): self.exists = exists self.file_okay = file_okay |