##// END OF EJS Templates
pytype: only output the "pytype crashed" message on error...
marmoute -
r52184:0bb52998 default
parent child Browse files
Show More
@@ -1,131 +1,133 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 set -e
3 set -e
4 set -u
4 set -u
5
5
6 cd `hg root`
6 cd `hg root`
7
7
8 # Many of the individual files that are excluded here confuse pytype
8 # Many of the individual files that are excluded here confuse pytype
9 # because they do a mix of Python 2 and Python 3 things
9 # because they do a mix of Python 2 and Python 3 things
10 # conditionally. There's no good way to help it out with that as far as
10 # conditionally. There's no good way to help it out with that as far as
11 # I can tell, so let's just hide those files from it for now. We should
11 # I can tell, so let's just hide those files from it for now. We should
12 # endeavor to empty this list out over time, as some of these are
12 # endeavor to empty this list out over time, as some of these are
13 # probably hiding real problems.
13 # probably hiding real problems.
14 #
14 #
15 # hgext/absorb.py # [attribute-error]
15 # hgext/absorb.py # [attribute-error]
16 # hgext/bugzilla.py # [pyi-error], [attribute-error]
16 # hgext/bugzilla.py # [pyi-error], [attribute-error]
17 # hgext/convert/bzr.py # [attribute-error]
17 # hgext/convert/bzr.py # [attribute-error]
18 # hgext/convert/cvs.py # [attribute-error], [wrong-arg-types]
18 # hgext/convert/cvs.py # [attribute-error], [wrong-arg-types]
19 # hgext/convert/cvsps.py # [attribute-error]
19 # hgext/convert/cvsps.py # [attribute-error]
20 # hgext/convert/p4.py # [wrong-arg-types] (__file: mercurial.utils.procutil._pfile -> IO)
20 # hgext/convert/p4.py # [wrong-arg-types] (__file: mercurial.utils.procutil._pfile -> IO)
21 # hgext/convert/subversion.py # [attribute-error], [name-error], [pyi-error]
21 # hgext/convert/subversion.py # [attribute-error], [name-error], [pyi-error]
22 # hgext/fastannotate/context.py # no linelog.copyfrom()
22 # hgext/fastannotate/context.py # no linelog.copyfrom()
23 # hgext/fastannotate/formatter.py # [unsupported-operands]
23 # hgext/fastannotate/formatter.py # [unsupported-operands]
24 # hgext/fsmonitor/__init__.py # [name-error]
24 # hgext/fsmonitor/__init__.py # [name-error]
25 # hgext/git/__init__.py # [attribute-error]
25 # hgext/git/__init__.py # [attribute-error]
26 # hgext/githelp.py # [attribute-error] [wrong-arg-types]
26 # hgext/githelp.py # [attribute-error] [wrong-arg-types]
27 # hgext/hgk.py # [attribute-error]
27 # hgext/hgk.py # [attribute-error]
28 # hgext/histedit.py # [attribute-error], [wrong-arg-types]
28 # hgext/histedit.py # [attribute-error], [wrong-arg-types]
29 # hgext/keyword.py # [attribute-error]
29 # hgext/keyword.py # [attribute-error]
30 # hgext/largefiles/storefactory.py # [attribute-error]
30 # hgext/largefiles/storefactory.py # [attribute-error]
31 # hgext/lfs/__init__.py # [attribute-error]
31 # hgext/lfs/__init__.py # [attribute-error]
32 # hgext/narrow/narrowbundle2.py # [attribute-error]
32 # hgext/narrow/narrowbundle2.py # [attribute-error]
33 # hgext/narrow/narrowcommands.py # [attribute-error], [name-error]
33 # hgext/narrow/narrowcommands.py # [attribute-error], [name-error]
34 # hgext/rebase.py # [attribute-error]
34 # hgext/rebase.py # [attribute-error]
35 # hgext/remotefilelog/basepack.py # [attribute-error], [wrong-arg-count]
35 # hgext/remotefilelog/basepack.py # [attribute-error], [wrong-arg-count]
36 # hgext/remotefilelog/basestore.py # [attribute-error]
36 # hgext/remotefilelog/basestore.py # [attribute-error]
37 # hgext/remotefilelog/contentstore.py # [missing-parameter], [wrong-keyword-args], [attribute-error]
37 # hgext/remotefilelog/contentstore.py # [missing-parameter], [wrong-keyword-args], [attribute-error]
38 # hgext/remotefilelog/fileserverclient.py # [attribute-error]
38 # hgext/remotefilelog/fileserverclient.py # [attribute-error]
39 # hgext/remotefilelog/shallowbundle.py # [attribute-error]
39 # hgext/remotefilelog/shallowbundle.py # [attribute-error]
40 # hgext/remotefilelog/remotefilectx.py # [module-attr] (This is an actual bug)
40 # hgext/remotefilelog/remotefilectx.py # [module-attr] (This is an actual bug)
41 # hgext/sqlitestore.py # [attribute-error]
41 # hgext/sqlitestore.py # [attribute-error]
42 # hgext/zeroconf/__init__.py # bytes vs str; tests fail on macOS
42 # hgext/zeroconf/__init__.py # bytes vs str; tests fail on macOS
43 #
43 #
44 # mercurial/bundlerepo.py # no vfs and ui attrs on bundlerepo
44 # mercurial/bundlerepo.py # no vfs and ui attrs on bundlerepo
45 # mercurial/context.py # many [attribute-error]
45 # mercurial/context.py # many [attribute-error]
46 # mercurial/crecord.py # tons of [attribute-error], [module-attr]
46 # mercurial/crecord.py # tons of [attribute-error], [module-attr]
47 # mercurial/debugcommands.py # [wrong-arg-types]
47 # mercurial/debugcommands.py # [wrong-arg-types]
48 # mercurial/dispatch.py # initstdio: No attribute ... on TextIO [attribute-error]
48 # mercurial/dispatch.py # initstdio: No attribute ... on TextIO [attribute-error]
49 # mercurial/exchange.py # [attribute-error]
49 # mercurial/exchange.py # [attribute-error]
50 # mercurial/hgweb/hgweb_mod.py # [attribute-error], [name-error], [wrong-arg-types]
50 # mercurial/hgweb/hgweb_mod.py # [attribute-error], [name-error], [wrong-arg-types]
51 # mercurial/hgweb/server.py # [attribute-error], [name-error], [module-attr]
51 # mercurial/hgweb/server.py # [attribute-error], [name-error], [module-attr]
52 # mercurial/hgweb/wsgicgi.py # confused values in os.environ
52 # mercurial/hgweb/wsgicgi.py # confused values in os.environ
53 # mercurial/httppeer.py # [attribute-error], [wrong-arg-types]
53 # mercurial/httppeer.py # [attribute-error], [wrong-arg-types]
54 # mercurial/interfaces # No attribute 'capabilities' on peer [attribute-error]
54 # mercurial/interfaces # No attribute 'capabilities' on peer [attribute-error]
55 # mercurial/keepalive.py # [attribute-error]
55 # mercurial/keepalive.py # [attribute-error]
56 # mercurial/localrepo.py # [attribute-error]
56 # mercurial/localrepo.py # [attribute-error]
57 # mercurial/manifest.py # [unsupported-operands], [wrong-arg-types]
57 # mercurial/manifest.py # [unsupported-operands], [wrong-arg-types]
58 # mercurial/minirst.py # [unsupported-operands], [attribute-error]
58 # mercurial/minirst.py # [unsupported-operands], [attribute-error]
59 # mercurial/pure/osutil.py # [invalid-typevar], [not-callable]
59 # mercurial/pure/osutil.py # [invalid-typevar], [not-callable]
60 # mercurial/pure/parsers.py # [attribute-error]
60 # mercurial/pure/parsers.py # [attribute-error]
61 # mercurial/repoview.py # [attribute-error]
61 # mercurial/repoview.py # [attribute-error]
62 # mercurial/testing/storage.py # tons of [attribute-error]
62 # mercurial/testing/storage.py # tons of [attribute-error]
63 # mercurial/unionrepo.py # ui, svfs, unfiltered [attribute-error]
63 # mercurial/unionrepo.py # ui, svfs, unfiltered [attribute-error]
64 # mercurial/win32.py # [not-callable]
64 # mercurial/win32.py # [not-callable]
65 # mercurial/wireprotoframing.py # [unsupported-operands], [attribute-error], [import-error]
65 # mercurial/wireprotoframing.py # [unsupported-operands], [attribute-error], [import-error]
66 # mercurial/wireprotov1peer.py # [attribute-error]
66 # mercurial/wireprotov1peer.py # [attribute-error]
67 # mercurial/wireprotov1server.py # BUG?: BundleValueError handler accesses subclass's attrs
67 # mercurial/wireprotov1server.py # BUG?: BundleValueError handler accesses subclass's attrs
68
68
69 # TODO: use --no-cache on test server? Caching the files locally helps during
69 # TODO: use --no-cache on test server? Caching the files locally helps during
70 # development, but may be a hinderance for CI testing.
70 # development, but may be a hinderance for CI testing.
71
71
72 # TODO: include hgext and hgext3rd
72 # TODO: include hgext and hgext3rd
73
73
74 pytype -V 3.7 --keep-going --jobs auto \
74 pytype -V 3.7 --keep-going --jobs auto \
75 doc/check-seclevel.py hgdemandimport hgext mercurial \
75 doc/check-seclevel.py hgdemandimport hgext mercurial \
76 -x hgext/absorb.py \
76 -x hgext/absorb.py \
77 -x hgext/bugzilla.py \
77 -x hgext/bugzilla.py \
78 -x hgext/convert/bzr.py \
78 -x hgext/convert/bzr.py \
79 -x hgext/convert/cvs.py \
79 -x hgext/convert/cvs.py \
80 -x hgext/convert/cvsps.py \
80 -x hgext/convert/cvsps.py \
81 -x hgext/convert/p4.py \
81 -x hgext/convert/p4.py \
82 -x hgext/convert/subversion.py \
82 -x hgext/convert/subversion.py \
83 -x hgext/fastannotate/context.py \
83 -x hgext/fastannotate/context.py \
84 -x hgext/fastannotate/formatter.py \
84 -x hgext/fastannotate/formatter.py \
85 -x hgext/fsmonitor/__init__.py \
85 -x hgext/fsmonitor/__init__.py \
86 -x hgext/git/__init__.py \
86 -x hgext/git/__init__.py \
87 -x hgext/githelp.py \
87 -x hgext/githelp.py \
88 -x hgext/hgk.py \
88 -x hgext/hgk.py \
89 -x hgext/histedit.py \
89 -x hgext/histedit.py \
90 -x hgext/keyword.py \
90 -x hgext/keyword.py \
91 -x hgext/largefiles/storefactory.py \
91 -x hgext/largefiles/storefactory.py \
92 -x hgext/lfs/__init__.py \
92 -x hgext/lfs/__init__.py \
93 -x hgext/narrow/narrowbundle2.py \
93 -x hgext/narrow/narrowbundle2.py \
94 -x hgext/narrow/narrowcommands.py \
94 -x hgext/narrow/narrowcommands.py \
95 -x hgext/rebase.py \
95 -x hgext/rebase.py \
96 -x hgext/remotefilelog/basepack.py \
96 -x hgext/remotefilelog/basepack.py \
97 -x hgext/remotefilelog/basestore.py \
97 -x hgext/remotefilelog/basestore.py \
98 -x hgext/remotefilelog/contentstore.py \
98 -x hgext/remotefilelog/contentstore.py \
99 -x hgext/remotefilelog/fileserverclient.py \
99 -x hgext/remotefilelog/fileserverclient.py \
100 -x hgext/remotefilelog/remotefilectx.py \
100 -x hgext/remotefilelog/remotefilectx.py \
101 -x hgext/remotefilelog/shallowbundle.py \
101 -x hgext/remotefilelog/shallowbundle.py \
102 -x hgext/sqlitestore.py \
102 -x hgext/sqlitestore.py \
103 -x hgext/zeroconf/__init__.py \
103 -x hgext/zeroconf/__init__.py \
104 -x mercurial/bundlerepo.py \
104 -x mercurial/bundlerepo.py \
105 -x mercurial/context.py \
105 -x mercurial/context.py \
106 -x mercurial/crecord.py \
106 -x mercurial/crecord.py \
107 -x mercurial/debugcommands.py \
107 -x mercurial/debugcommands.py \
108 -x mercurial/dispatch.py \
108 -x mercurial/dispatch.py \
109 -x mercurial/exchange.py \
109 -x mercurial/exchange.py \
110 -x mercurial/hgweb/hgweb_mod.py \
110 -x mercurial/hgweb/hgweb_mod.py \
111 -x mercurial/hgweb/server.py \
111 -x mercurial/hgweb/server.py \
112 -x mercurial/hgweb/wsgicgi.py \
112 -x mercurial/hgweb/wsgicgi.py \
113 -x mercurial/httppeer.py \
113 -x mercurial/httppeer.py \
114 -x mercurial/interfaces \
114 -x mercurial/interfaces \
115 -x mercurial/keepalive.py \
115 -x mercurial/keepalive.py \
116 -x mercurial/localrepo.py \
116 -x mercurial/localrepo.py \
117 -x mercurial/manifest.py \
117 -x mercurial/manifest.py \
118 -x mercurial/minirst.py \
118 -x mercurial/minirst.py \
119 -x mercurial/pure/osutil.py \
119 -x mercurial/pure/osutil.py \
120 -x mercurial/pure/parsers.py \
120 -x mercurial/pure/parsers.py \
121 -x mercurial/repoview.py \
121 -x mercurial/repoview.py \
122 -x mercurial/testing/storage.py \
122 -x mercurial/testing/storage.py \
123 -x mercurial/thirdparty \
123 -x mercurial/thirdparty \
124 -x mercurial/unionrepo.py \
124 -x mercurial/unionrepo.py \
125 -x mercurial/win32.py \
125 -x mercurial/win32.py \
126 -x mercurial/wireprotoframing.py \
126 -x mercurial/wireprotoframing.py \
127 -x mercurial/wireprotov1peer.py \
127 -x mercurial/wireprotov1peer.py \
128 -x mercurial/wireprotov1server.py
128 -x mercurial/wireprotov1server.py
129
129
130 echo 'pytype crashed while generating the following type stubs:'
130 if find .pytype/pyi -name '*.pyi' | xargs grep -ql '# Caught error'; then
131 find .pytype/pyi -name '*.pyi' | xargs grep -l '# Caught error' | sort
131 echo 'pytype crashed while generating the following type stubs:'
132 find .pytype/pyi -name '*.pyi' | xargs grep -l '# Caught error' | sort
133 fi
General Comments 0
You need to be logged in to leave comments. Login now