[flake8]
extend-ignore = E203, E266, E501
# line length is intentionally set to 80 here because black uses Bugbear
-# See https://github.com/psf/black/blob/master/docs/the_black_code_style.md#line-length for more details
+# See https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length for more details
max-line-length = 80
max-complexity = 18
select = B,C,E,F,W,T4,B9
**Environment (please complete the following information):**
-- Version: \[e.g. master\]
+- Version: \[e.g. main\]
- OS and Python version: \[e.g. Linux/Python 3.7.4rc1\]
-**Does this bug also happen on master?** To answer this, you have two options:
+**Does this bug also happen on main?** To answer this, you have two options:
-1. Use the online formatter at <https://black.vercel.app/?version=master>, which will
- use the latest master branch.
+1. Use the online formatter at <https://black.vercel.app/?version=main>, which will use
+ the latest main branch.
1. Or run _Black_ on your machine:
- create a new virtualenv (make sure it's the same Python version);
- clone this repository;
### Documentation
+- Replaced all remaining references to the
+ [`master`](https://github.com/psf/black/tree/main) branch with the
+ [`main`](https://github.com/psf/black/tree/main) branch. Some additional changes in
+ the source code were also made. (#2210)
- Sigificantly reorganized the documentation to make much more sense. Check them out by
heading over to [the stable docs on RTD](https://black.readthedocs.io/en/stable/).
(#2174)
-![Black Logo](https://raw.githubusercontent.com/psf/black/master/docs/_static/logo2-readme.png)
+![Black Logo](https://raw.githubusercontent.com/psf/black/main/docs/_static/logo2-readme.png)
<h2 align="center">The Uncompromising Code Formatter</h2>
<a href="https://github.com/psf/black/actions"><img alt="Actions Status" src="https://github.com/psf/black/workflows/Test/badge.svg"></a>
<a href="https://github.com/psf/black/actions"><img alt="Actions Status" src="https://github.com/psf/black/workflows/Primer/badge.svg"></a>
<a href="https://black.readthedocs.io/en/stable/?badge=stable"><img alt="Documentation Status" src="https://readthedocs.org/projects/black/badge/?version=stable"></a>
-<a href="https://coveralls.io/github/psf/black?branch=master"><img alt="Coverage Status" src="https://coveralls.io/repos/github/psf/black/badge.svg?branch=master"></a>
-<a href="https://github.com/psf/black/blob/master/LICENSE"><img alt="License: MIT" src="https://black.readthedocs.io/en/stable/_static/license.svg"></a>
+<a href="https://coveralls.io/github/psf/black?branch=main"><img alt="Coverage Status" src="https://coveralls.io/repos/github/psf/black/badge.svg?branch=main"></a>
+<a href="https://github.com/psf/black/blob/main/LICENSE"><img alt="License: MIT" src="https://black.readthedocs.io/en/stable/_static/license.svg"></a>
<a href="https://pypi.org/project/black/"><img alt="PyPI" src="https://img.shields.io/pypi/v/black"></a>
<a href="https://pepy.tech/project/black"><img alt="Downloads" src="https://pepy.tech/badge/black"></a>
<a href="https://anaconda.org/conda-forge/black/"><img alt="conda-forge" src="https://img.shields.io/conda/dn/conda-forge/black.svg?label=conda-forge"></a>
if we get source code changes. It will error on formatting changes or errors. Please run
before pushing your PR to see if you get the actions you would expect from _Black_ with
your PR. You may need to change
-[primer.json](https://github.com/psf/black/blob/master/src/black_primer/primer.json)
+[primer.json](https://github.com/psf/black/blob/main/src/black_primer/primer.json)
configuration for it to pass.
For more `black-primer` information visit the
tools, using **their** supported file formats.
Compatible configuration files can be
-[found here](https://github.com/psf/black/blob/master/docs/compatible_configs/).
+[found here](https://github.com/psf/black/blob/main/docs/compatible_configs/).
### isort
restarting Vim.
If you need to do anything special to make your virtualenv work and install _Black_ (for
-example you want to run a version from master), create a virtualenv manually and point
+example you want to run a version from main), create a virtualenv manually and point
`g:black_virtualenv` to it. The plugin will use it.
To run _Black_ on save, add the following line to `.vimrc` or `init.vim`:
def get_package_source(package: str, version: Optional[str]) -> str:
if package == "cpython":
if version is None:
- version = "master"
+ version = "main"
return f"https://github.com/python/cpython/archive/{version}.zip"
elif package == "pypy":
if version is None:
black_version=black_version,
input_directory=options.input,
)
- git_switch_branch("master", repo=repo)
+ git_switch_branch("main", repo=repo)
- git_switch_branch("master", repo=options.black_repo)
+ git_switch_branch("main", repo=options.black_repo)
def main() -> None:
type=Path,
help="Output directory to download and put result artifacts.",
)
- parser.add_argument("versions", nargs="*", default=("master",), help="")
+ parser.add_argument("versions", nargs="*", default=("main",), help="")
options = parser.parse_args()
repos = init_repos(options)
author="Łukasz Langa",
author_email="lukasz@langa.pl",
url="https://github.com/psf/black",
- project_urls={"Changelog": "https://github.com/psf/black/blob/master/CHANGES.md"},
+ project_urls={"Changelog": "https://github.com/psf/black/blob/main/CHANGES.md"},
license="MIT",
py_modules=["_black_version"],
ext_modules=ext_modules,