From f2a7e4685cde4de15c453eb3b9d6de82e6d72294 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 23 Dec 2019 11:58:26 +1000 Subject: [PATCH] give up on pytype the fix/check/fix cycle is infuriating slow --- Makefile | 11 +---------- README.contributing | 6 ------ 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 8a838a4d6..0531f7673 100644 --- a/Makefile +++ b/Makefile @@ -66,10 +66,6 @@ RUNREQS := .build/pyrunreqs .build/jsreqs ./tools/typecheck-setup.sh touch $@ -.build/pytypereqs: .build/pycheckreqs - pip install pytype - touch $@ - .build/jsreqs: ts/package.json (cd ts && npm i) touch $@ @@ -140,15 +136,10 @@ PYCHECKDEPS := $(BUILDDEPS) .build/pycheckreqs $(shell find anki aqt -name '*.py black --check $(BLACKARGS) # if this fails, run 'make fixpyfmt' touch $@ -.build/pytype: $(PYCHECKDEPS) .build/pytypereqs - pytype --config pytype.conf - touch $@ - -.PHONY: mypy pytest pylint pytype pyimports pyfmt +.PHONY: mypy pytest pylint pyimports pyfmt mypy: .build/mypy pytest: .build/pytest pylint: .build/pylint -pytype: .build/pytype pyimports: .build/pyimports pyfmt: .build/pyfmt diff --git a/README.contributing b/README.contributing index ed5259b73..545735067 100644 --- a/README.contributing +++ b/README.contributing @@ -54,12 +54,6 @@ but not very good at type inference, so it is mostly useful for checking code that has type signatures. It is able to read the bundled Qt stubs, and works across the whole Anki codebase. -You can optionally use 'make pytype' to typecheck the code with pytype. Pytype -is much slower, but it can catch errors in untyped code that mypy misses. It -is not able to check the aqt/* code, as it can't read the Qt stubs, and it is -not currently compatible with Python 3.8. It can be difficult to build on -some platforms. - The Qt stubs are not perfect, so you'll find when doing things like connecting signals, you may have to add the following to the end of a line to silence the spurious errors.