X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/898915d5569f503c278ef53cb6f10e003034943c..453828d17d50e4bf8bdef972fa6815258e380034:/src/black/__init__.py diff --git a/src/black/__init__.py b/src/black/__init__.py index dbcb559..60a339c 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -127,7 +127,9 @@ def read_pyproject_toml( otherwise. """ if not value: - value = find_pyproject_toml(ctx.params.get("src", ())) + value = find_pyproject_toml( + ctx.params.get("src", ()), ctx.params.get("stdin_filename", None) + ) if value is None: return None @@ -362,6 +364,7 @@ def validate_regex( @click.option( "--stdin-filename", type=str, + is_eager=True, help=( "The name of the file when passing it through stdin. Useful to make " "sure Black will respect --force-exclude option on some "