mirror of https://github.com/zulip/zulip.git
run-mypy: Check scripts by default.
Previously, we checked scripts in a separate run to work around mypy not supporting multiple scripts with the same name. Since we have fixed that issue, we can restore the original behavior. We leave the --scripts-only option available, though I'm not sure it's particularly useful and we'll probably eventually remove it.
This commit is contained in:
parent
4dbdf7e373
commit
9e503f2dcf
|
@ -99,7 +99,7 @@ else:
|
|||
# find all non-excluded files in current directory
|
||||
files_dict = cast(Dict[str, List[str]],
|
||||
lister.list_files(targets=args.targets, ftypes=['py', 'pyi'],
|
||||
use_shebang=args.scripts_only, modified_only=args.modified,
|
||||
use_shebang=True, modified_only=args.modified,
|
||||
exclude = exclude + ['stubs'], group_by_ftype=True,
|
||||
extless_only=args.scripts_only))
|
||||
pyi_files = set(files_dict['pyi'])
|
||||
|
@ -127,9 +127,6 @@ if args.disallow_untyped_defs:
|
|||
|
||||
# run mypy
|
||||
if python_files:
|
||||
if args.scripts_only:
|
||||
rc = subprocess.call([mypy_command] + extra_args + python_files)
|
||||
else:
|
||||
rc = subprocess.call([mypy_command] + extra_args + python_files)
|
||||
if args.linecoverage_report:
|
||||
# Move the coverage report to where coveralls will look for it.
|
||||
|
|
|
@ -4,8 +4,6 @@ retcode=0
|
|||
set -x
|
||||
./tools/run-mypy --py2 --linecoverage-report || retcode=1
|
||||
./tools/run-mypy --py3 || retcode=1
|
||||
./tools/run-mypy --py2 --scripts-only --no-disallow-untyped-defs || retcode=1
|
||||
./tools/run-mypy --py3 --scripts-only --no-disallow-untyped-defs || retcode=1
|
||||
set +x
|
||||
|
||||
if [ "$retcode" == "0" ]; then
|
||||
|
|
Loading…
Reference in New Issue