black/docs
Thiago Bellini Ribeiro dea81b7ad5
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 <hugovk@users.noreply.github.com>

* 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 <hugovk@users.noreply.github.com>
2020-11-13 07:26:07 -08:00
..
_static Scrollable sidebar (#1457) 2020-05-23 11:56:50 -07:00
compatible_configs Add compatible configuration files. (psf#1789) (#1792) 2020-10-30 08:13:55 -07:00
reference Use properly renamed function name in docs 2020-08-21 16:45:30 +02:00
authors.md Fix GitHub markdown links to work on RTD (#1752) 2020-10-18 14:27:15 -07:00
black_primer.md Upgrade docs to Sphinx 3+ and add doc build test (#1613) 2020-08-21 00:06:41 +02:00
blackd.md Fix grammatical typos in black_primer and blackd (#1504) 2020-06-16 11:57:33 -07:00
change_log.md Provide a stdin-filename to allow stdin to respect force-exclude rules (#1780) 2020-11-13 07:26:07 -08:00
compatible_configs.md Add compatible configuration files. (psf#1789) (#1792) 2020-10-30 08:13:55 -07:00
conf.py Make doc generation a little smarter, update doc sections 2020-08-24 14:42:17 +02:00
contributing_to_black.md Fix GitHub markdown links to work on RTD (#1752) 2020-10-18 14:27:15 -07:00
editor_integration.md Update PyCharm integrations instructions to avoid running on external changes (#1769) 2020-10-19 10:34:42 -07:00
github_actions.md Allow black's Github action params overriding. (#1755) 2020-10-18 14:24:33 -07:00
ignoring_unmodified_files.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
index.rst Upgrade docs to Sphinx 3+ and add doc build test (#1613) 2020-08-21 00:06:41 +02:00
installation_and_usage.md Fix GitHub markdown links to work on RTD (#1752) 2020-10-18 14:27:15 -07:00
make.bat add sphinx docs skeleton (#71) 2018-03-23 14:27:04 -07:00
Makefile add sphinx docs skeleton (#71) 2018-03-23 14:27:04 -07:00
pyproject_toml.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
requirements.txt Upgrade docs to Sphinx 3+ and add doc build test (#1613) 2020-08-21 00:06:41 +02:00
show_your_style.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
the_black_code_style.md Clarify current trailing comma behavior in the docs 2020-09-01 13:24:31 +02:00
version_control_integration.md Document some culprits with pre-commit (#1783) 2020-10-27 13:59:43 -07:00