Before

1# standard library
2import sys
3import json
4import portage
5from datetime import datetime
6
7# external library
8# portage api: sys-apps/portage
9import portage
10# dev-python/termcolor
11from termcolor import colored
12# http: dev-python/requests
13import requests
14
15VERSION='3.4'
16BASEURL='https://www.portagefilelist.de/query.php?file=%s'
17
18# the main method to run this.
19# options are
20# options = {
21# 'file': '',
…lines 22–172 unchanged (151 lines)

After

1# standard library
2import sys
3import json
4from datetime import datetime
5
6# external library
7# portage api: sys-apps/portage
8import portage
9# dev-python/termcolor
10from termcolor import colored
11# http: dev-python/requests
12import requests
13
14VERSION='3.5'
15BASEURL='https://www.portagefilelist.de/query.php?file=%s'
16
17# the main method to run this.
18# options are
19# options = {
20# 'file': '',
…lines 21–171 unchanged (151 lines)

Before

module
comment "# standard library"
import_statement
import "import"
dotted_name
identifier "sys"
import_statement
import "import"
dotted_name
identifier "json"
import_statement
import "import"
dotted_name
identifier "portage"
import_from_statement
from "from"
dotted_name
identifier "datetime"
import "import"
dotted_name
identifier "datetime"
comment "# external library"
comment "# portage api: sys-apps/portage"
import_statement
import "import"
dotted_name
identifier "portage"
comment "# dev-python/termcolor"
import_from_statement
from "from"
dotted_name
identifier "termcolor"
import "import"
dotted_name
identifier "colored"
comment "# http: dev-python/requests"
import_statement
import "import"
dotted_name
identifier "requests"
expression_statement
assignment
identifier "VERSION"
= "="
string
string_start "'"
string_content "3.4"
string_end "'"
expression_statement
assignment
identifier "BASEURL"
= "="
string
string_start "'"
string_content "https://www.portagefilelist.de/query.php?file=%s"
string_end "'"
comment "# the main method to run this."
comment "# options are"
comment "# options = {"
comment "# 'file': '',"
comment "# 'stdout': False"
comment "# }"
comment "# Use options['stdout'] = True if you wan to run this as a s"...
comment "# With False the output is collected and returned, so no imm"...
function_definition (+29 nodes collapsed)
class_definition (+1599 nodes collapsed)

After

module
comment "# standard library"
import_statement
import "import"
dotted_name
identifier "sys"
import_statement
import "import"
dotted_name
identifier "json"
import_from_statement
from "from"
dotted_name
identifier "datetime"
import "import"
dotted_name
identifier "datetime"
comment "# external library"
comment "# portage api: sys-apps/portage"
import_statement
import "import"
dotted_name
identifier "portage"
comment "# dev-python/termcolor"
import_from_statement
from "from"
dotted_name
identifier "termcolor"
import "import"
dotted_name
identifier "colored"
comment "# http: dev-python/requests"
import_statement
import "import"
dotted_name
identifier "requests"
expression_statement
assignment
identifier "VERSION"
= "="
string
string_start "'"
string_content "3.5"
string_end "'"
expression_statement
assignment
identifier "BASEURL"
= "="
string
string_start "'"
string_content "https://www.portagefilelist.de/query.php?file=%s"
string_end "'"
comment "# the main method to run this."
comment "# options are"
comment "# options = {"
comment "# 'file': '',"
comment "# 'stdout': False"
comment "# }"
comment "# Use options['stdout'] = True if you wan to run this as a s"...
comment "# With False the output is collected and returned, so no imm"...
function_definition (+29 nodes collapsed)
class_definition (+1599 nodes collapsed)