X Tutup
Skip to content

Commit d8b0472

Browse files
committed
Sort python imports
1 parent fcc6d5d commit d8b0472

29 files changed

+65
-35
lines changed

build_link_map.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
# filename -> title mapping to a xml file.
2222

2323
import fnmatch
24-
import re
2524
import os
25+
import re
26+
2627
from link_map import LinkMap
2728

2829

commands/preprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919

2020
import fnmatch
2121
import io
22-
import re
2322
import os
23+
import re
2424
import shutil
2525
import urllib.parse
26+
2627
from lxml import etree
2728

2829

commands/preprocess_cssless.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
import logging
2222
import os
2323
import warnings
24-
from premailer import Premailer
24+
2525
import cssutils
2626
from lxml import etree
2727
from lxml.etree import strip_elements
28+
from premailer import Premailer
2829

2930

3031
def preprocess_html_merge_cssless(src_path, dst_path):

ddg_parse_html.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import re
2222
from copy import deepcopy
23+
2324
import lxml.etree as e
2425

2526

devhelp2qch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919

2020

2121
import argparse
22+
2223
from lxml import etree
24+
2325
from index_transform.devhelp_qch import convert_devhelp_to_qch
2426

2527

export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
'''
2020

2121
import argparse
22+
import json
2223
import urllib.parse
2324
import urllib.request
24-
import json
2525

2626

2727
def retrieve_page_names(root, ns_index):

fix_devhelp-links.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
'''
2020

2121
import sys
22+
2223
import lxml.etree as e
23-
from link_map import LinkMap
2424

25+
from link_map import LinkMap
2526

2627
if len(sys.argv) != 3:
2728
print('''Please provide the following 2 argument:

gadgets/replace_tests_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import re
2525
import sys
2626

27+
2728
def get_html_files(root):
2829
files = []
2930
for dir, dirnames, filenames in os.walk(root):

gadgets/standard_revisions_tests/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
'''
1919

2020
import unittest
21+
2122
from selenium import webdriver
2223
from selenium.webdriver.support.ui import Select
2324

gadgets/sync_tests_mwiki.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@
2929
# command line.
3030
os.environ['PYWIKIBOT2_NO_USER_CONFIG']='1'
3131

32-
import pywikibot
33-
import pywikibot.config2
34-
import pywikibot.pagegenerators
35-
import pywikibot.data.api
36-
3732
import argparse
3833
import itertools
3934
import shutil
4035
import sys
4136
import urllib
4237

38+
import pywikibot
39+
import pywikibot.config2
40+
import pywikibot.data.api
41+
import pywikibot.pagegenerators
42+
4343
SYNC_DIRECTION_UPLOAD = 1
4444
SYNC_DIRECTION_DOWNLOAD = 2
4545

0 commit comments

Comments
 (0)
X Tutup