mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Suggest starting multi-line imports on the next line to pass flake8 (#923)
This commit is contained in:
parent
7e33f2bd52
commit
151d1c5a0c
@ -47,8 +47,15 @@ It seems the preference is for slashes, but using parentheses is okay too. (Ther
|
|||||||
|
|
||||||
If you need to `import` lots of names from a module or package, and they won't all fit in one line (without making the line too long), then use parentheses to spread the names across multiple lines, like so:
|
If you need to `import` lots of names from a module or package, and they won't all fit in one line (without making the line too long), then use parentheses to spread the names across multiple lines, like so:
|
||||||
```python
|
```python
|
||||||
|
from Tkinter import (
|
||||||
|
Tk, Frame, Button, Entry, Canvas, Text,
|
||||||
|
LEFT, DISABLED, NORMAL, RIDGE, END,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Or
|
||||||
|
|
||||||
from Tkinter import (Tk, Frame, Button, Entry, Canvas, Text,
|
from Tkinter import (Tk, Frame, Button, Entry, Canvas, Text,
|
||||||
LEFT, DISABLED, NORMAL, RIDGE, END)
|
LEFT, DISABLED, NORMAL, RIDGE, END)
|
||||||
```
|
```
|
||||||
|
|
||||||
For the rationale, see [PEP 328](https://www.python.org/dev/peps/pep-0328/#rationale-for-parentheses).
|
For the rationale, see [PEP 328](https://www.python.org/dev/peps/pep-0328/#rationale-for-parentheses).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user