Skip to content

Commit 31ab4e0

Browse files
committed
Clean up
1 parent c105220 commit 31ab4e0

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ check:
1414
--disable=no-name-in-module \
1515
--disable=protected-access \
1616
--disable=raising-bad-type \
17+
--disable=redefined-variable-type \
1718
--disable=similarities \
1819
--disable=too-few-public-methods \
1920
--disable=too-many-branches \
2021
--disable=too-many-locals \
2122
--disable=too-many-statements \
23+
--disable=wrong-import-order \
24+
--disable=wrong-import-position \
2225
./language-check \
2326
$(wildcard ./language_check/*.py) \
2427
$(wildcard *.py)

‎language_check/main.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313

1414

1515
def parse_args():
16-
parser = argparse.ArgumentParser(description=__doc__.strip(),
17-
prog='language-check')
16+
parser = argparse.ArgumentParser(
17+
description=__doc__.strip() if __doc__ else None,
18+
prog='language-check')
1819
parser.add_argument('files', nargs='+',
1920
help='plain text file or "-" for stdin')
2021
parser.add_argument('-c', '--encoding',

‎language_check/which.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""Cross-platform which command."""
44

55
import os
6+
import sys
67

78

89
__all__ = ['which']
@@ -72,5 +73,4 @@ def main():
7273

7374

7475
if __name__ == '__main__':
75-
import sys
7676
sys.exit(main())

‎setup.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import glob
77
import io
88
import os
9+
import platform
910
import re
1011
import shutil
1112
import subprocess
@@ -120,8 +121,7 @@ def __len__(self):
120121
('metadata', 'requires-external'),
121122
])
122123

123-
# For environment markers
124-
import platform
124+
# For environment markers.
125125
assert platform
126126

127127

@@ -479,7 +479,7 @@ def copy_data(src, dst):
479479
path = os.path.join(py3k_path, fn)
480480
if not os.path.isfile(path):
481481
continue
482-
if not os.path.splitext(path)[1].lower() == '.py':
482+
if os.path.splitext(path)[1].lower() != '.py':
483483
continue
484484
new_path = os.path.join(py2k_path, fn)
485485
if copy(path, new_path):

0 commit comments

Comments
 (0)