|
1 | 1 | ---
|
2 | 2 | name: Bug report
|
3 |
| -about: Create a report to help us improve |
| 3 | +about: Create a report to help us improve Black's quality |
4 | 4 | title: ""
|
5 |
| -labels: bug |
| 5 | +labels: "T: bug" |
6 | 6 | assignees: ""
|
7 | 7 | ---
|
8 | 8 |
|
9 |
| -**Describe the bug** A clear and concise description of what the bug is. |
| 9 | +<!-- |
| 10 | +Please make sure that the bug is not already fixed either in newer versions or the |
| 11 | +current development version. To confirm this, you have three options: |
10 | 12 |
|
11 |
| -**To Reproduce** Steps to reproduce the behavior: |
| 13 | +1. Update Black's version if a newer release exists: `pip install -U black` |
| 14 | +2. Use the online formatter at <https://black.vercel.app/?version=main>, which will use |
| 15 | + the latest main branch. |
| 16 | +3. Or run _Black_ on your machine: |
| 17 | + - create a new virtualenv (make sure it's the same Python version); |
| 18 | + - clone this repository; |
| 19 | + - run `pip install -e .[d]`; |
| 20 | + - run `pip install -r test_requirements.txt` |
| 21 | + - make sure it's sane by running `python -m pytest`; and |
| 22 | + - run `black` like you did last time. |
| 23 | +--> |
12 | 24 |
|
13 |
| -1. Take this file '...' |
14 |
| -2. Run _Black_ on it with these arguments '....' |
15 |
| -3. See error |
| 25 | +**Describe the bug** |
16 | 26 |
|
17 |
| -**Expected behavior** A clear and concise description of what you expected to happen. |
| 27 | +<!-- A clear and concise description of what the bug is. --> |
18 | 28 |
|
19 |
| -**Environment (please complete the following information):** |
| 29 | +**To Reproduce** |
20 | 30 |
|
21 |
| -- Version: [e.g. master] |
22 |
| -- OS and Python version: [e.g. Linux/Python 3.7.4rc1] |
| 31 | +<!-- |
| 32 | +Minimal steps to reproduce the behavior with source code and Black's configuration. |
| 33 | +--> |
23 | 34 |
|
24 |
| -**Does this bug also happen on master?** To answer this, you have two options: |
| 35 | +For example, take this code: |
25 | 36 |
|
26 |
| -1. Use the online formatter at https://black.now.sh/?version=master, which will use the |
27 |
| - latest master branch. |
28 |
| -2. Or run _Black_ on your machine: |
29 |
| - - create a new virtualenv (make sure it's the same Python version); |
30 |
| - - clone this repository; |
31 |
| - - run `pip install -e .`; |
32 |
| - - make sure it's sane by running `python -m unittest`; and |
33 |
| - - run `black` like you did last time. |
| 37 | +```python |
| 38 | +this = "code" |
| 39 | +``` |
| 40 | + |
| 41 | +And run it with these arguments: |
| 42 | + |
| 43 | +```sh |
| 44 | +$ black file.py --target-version py39 |
| 45 | +``` |
| 46 | + |
| 47 | +The resulting error is: |
| 48 | + |
| 49 | +> cannot format file.py: INTERNAL ERROR: ... |
| 50 | +
|
| 51 | +**Expected behavior** |
| 52 | + |
| 53 | +<!-- A clear and concise description of what you expected to happen. --> |
| 54 | + |
| 55 | +**Environment** |
| 56 | + |
| 57 | +<!-- Please complete the following information: --> |
| 58 | + |
| 59 | +- Black's version: <!-- e.g. [main] --> |
| 60 | +- OS and Python version: <!-- e.g. [Linux/Python 3.7.4rc1] --> |
| 61 | + |
| 62 | +**Additional context** |
34 | 63 |
|
35 |
| -**Additional context** Add any other context about the problem here. |
| 64 | +<!-- Add any other context about the problem here. --> |
0 commit comments