forked from psf/black
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a stdin-filename to allow stdin to respect force-exclude rules (
psf#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 <[email protected]> * --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 <[email protected]> * 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 <[email protected]> * Check for is_stdin and p.is_file before checking for p.is_dir() Co-authored-by: Richard Si <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
- Loading branch information
1 parent
7d032fa
commit dea81b7
Showing
4 changed files
with
217 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters