From: Thiago Bellini Ribeiro Date: Fri, 13 Nov 2020 15:26:07 +0000 (-0300) Subject: Provide a stdin-filename to allow stdin to respect force-exclude rules (#1780) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/dea81b7ad5cfa04c3572771c34af823449d0a8f3?ds=sidebyside;hp=dea81b7ad5cfa04c3572771c34af823449d0a8f3 Provide a stdin-filename to allow stdin to respect force-exclude rules (#1780) * Provide a stdin-filename to allow stdin to respect exclude/force-exclude rules This will allow automatic tools to enforce the project's exclude/force-exclude rules even if they pass the file through stdin to update its buffer. This is a similar solution to --stdin-display-name in flake8. * Update src/black/__init__.py Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com> * --stdin-filename should only respect --exclude-filename * Update README with the new --stdin-filename option * Write some tests for the new stdin-filename functionality * Apply suggestions from code review Co-authored-by: Hugo van Kemenade * Force stdin output when we asked for stdin even if the file exists * Add an entry in the changelog regarding --stdin-filename * Reduce disk reads if possible Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com> * Check for is_stdin and p.is_file before checking for p.is_dir() Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com> Co-authored-by: Hugo van Kemenade ---