From b36bf8f9b36ab7db8cf03cd8eff714dfc33f0c29 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 31 Mar 2022 13:41:31 -0700 Subject: [PATCH] restore Path param order --- CHANGES.rst | 3 +++ src/click/types.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2c570e2b3..49be6a66e 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 2ca4ffb3c..b45ee53d0 100644 --- a/src/click/types.py +++ b/src/click/types.py @@ -790,12 +790,12 @@ def __init__( 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