FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/ql/src/Imports/CyclicImport.qhelp at codeql-cli/v2.19.2 · github/codeql · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10k
Code
Issues
998
Pull requests
467
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Imports
/
CyclicImport.qhelp
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (27 loc) · 1.23 KB
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Imports
/
CyclicImport.qhelp
Copy path
File metadata and controls
36 lines (27 loc) · 1.23 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
30
31
32
33
34
35
36
<!
DOCTYPE
qhelp
PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<
qhelp
>
<
overview
>
<
p
>A cyclic import is an <
code
>import</
code
> which imports another module
and that module imports (possibly indirectly) the module which contains the
<
code
>import</
code
> statement.</
p
>
<
p
>Cyclic imports indicate that two modules are circularly dependent. This means
that the modules cannot be tested independently, and it makes it harder to
understand the architecture of the system.
</
p
>
</
overview
>
<
recommendation
>
<
p
>The cycle may be broken by removing any one import. If only one function or
method requires the import, then consider moving that to the other module and
deleting the import. If the two modules are more intimately connected, then move
the inter-dependent parts into a third module and have both the original modules
import that.
</
p
>
</
recommendation
>
<
references
>
<
li
>Python Language Reference: <
a
href
=
"
http://docs.python.org/2/reference/simple_stmts.html#import
"
>The import statement</
a
>.</
li
>
<
li
>Python: <
a
href
=
"
http://docs.python.org/2/tutorial/modules.html
"
>Modules</
a
>.</
li
>
<
li
> Effbot: <
a
href
=
"
https://web.archive.org/web/20200917011425/https://effbot.org/zone/import-confusion.htm
"
>Import Confusion</
a
>.</
li
>
</
references
>
</
qhelp
>
Back
|
FazBrowse Home
|
New Git URL