From c69b1185d3ede2a84fb3cb31a0946ad752e6f104 Mon Sep 17 00:00:00 2001 From: Twentysix Date: Wed, 3 Oct 2018 00:19:30 +0200 Subject: [PATCH] [Black] Don't normalize underscores in numeric literals (#2174) --- .github/CONTRIBUTING.md | 2 +- make.bat | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 186a14ada..172bc6eff 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -92,7 +92,7 @@ Your PR will not be merged until all of these tests pass. ### 4.3 Style Our style checker of choice, [black](https://github.com/ambv/black), actually happens to be an auto-formatter. The checking functionality simply detects whether or not it would try to reformat something in your code, should you run the formatter on it. For this reason, we recommend using this tool as a formatter, regardless of any disagreements you might have with the style it enforces. -Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/ambv/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. When using `black` on the command line, simply use it like so: `black -l 99 `. +Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/ambv/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. When using `black` on the command line, simply use it like so: `black -l 99 -N `. ### 4.4 Make You may have noticed we have a `Makefile` and a `make.bat` in the top-level directory. For now, you can do two things with them: diff --git a/make.bat b/make.bat index b7b6ec9dc..812ad2ec7 100644 --- a/make.bat +++ b/make.bat @@ -14,11 +14,11 @@ for /F "tokens=* USEBACKQ" %%A in (`git ls-files "*.py"`) do ( goto %1 :reformat -black -l 99 !PYFILES! +black -l 99 -N !PYFILES! exit /B %ERRORLEVEL% :stylecheck -black -l 99 --check !PYFILES! +black -l 99 -N --check !PYFILES! exit /B %ERRORLEVEL% :help