-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathImports.qhelp
More file actions
29 lines (23 loc) · 830 Bytes
/
Imports.qhelp
File metadata and controls
29 lines (23 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>Code is easier to read when each import statement is defined on a separate line.
</p>
</overview>
<recommendation>
<p>Update the code so that each import is defined on a separate line. PEP8 notes that it is
acceptable to define multiple imports from a subprocess in a single statement.</p>
</recommendation>
<example>
<p>The import statement:</p>
<sample src="ImportTwiceOnALine.py" />
<p>should be changed to:</p>
<sample src="ImportOnTwoLines.py" />
</example>
<references>
<li>Python Language Reference: <a href="http://docs.python.org/2/reference/simple_stmts.html#import">The import statement</a>.</li>
<li>Python PEP 8: <a href="http://www.python.org/dev/peps/pep-0008/#imports">Imports</a>.</li>
</references>
</qhelp>