File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff line change 1313
1414
1515def 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' ,
Original file line number Diff line number Diff line change 33"""Cross-platform which command."""
44
55import os
6+ import sys
67
78
89__all__ = ['which' ]
@@ -72,5 +73,4 @@ def main():
7273
7374
7475if __name__ == '__main__' :
75- import sys
7676 sys .exit (main ())
Original file line number Diff line number Diff line change 66import glob
77import io
88import os
9+ import platform
910import re
1011import shutil
1112import 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.
125125assert 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 ):
You can’t perform that action at this time.
0 commit comments