facebook / pyre-check

Performant type-checking for python.
https://pyre-check.org/
MIT License
6.86k stars 437 forks source link

pyre upgrade to version 0.0.36 produces errors #240

Closed samuela closed 4 years ago

samuela commented 4 years ago

Ok, I have a project that I typecheck with pyre. Everything typechecks fine in all the versions I've tested up to 0.0.33, but then starting with version 0.0.36 I'm getting all kinds of errors. (Note that there were no versions released between 0.0.33 and 0.0.36: https://pypi.org/project/pyre-check/#history.)

numpy/__init__.pyi:9:0 Undefined import [21]: Could not find a module corresponding to import `__future__`.
numpy/__init__.pyi:9:0 Undefined import [21]: Could not find a module corresponding to import `__future__`.
numpy/__init__.pyi:11:0 Undefined import [21]: Could not find a module corresponding to import `typing`.
numpy/__init__.pyi:11:0 Undefined import [21]: Could not find a module corresponding to import `typing`.
numpy/__init__.pyi:15:4 Undefined or invalid type [11]: Annotation `float` is not defined as a type.
numpy/__init__.pyi:15:4 Undefined or invalid type [11]: Annotation `float` is not defined as a type.
numpy/__init__.pyi:16:9 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type.
numpy/__init__.pyi:16:9 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type.
numpy/__init__.pyi:20:14 Undefined or invalid type [11]: Annotation `Iterable` is not defined as a type.
numpy/__init__.pyi:20:14 Undefined or invalid type [11]: Annotation `Iterable` is not defined as a type.
...

I've attached the source code here: research.zip

Complete error log ``` ƛ Could not parse file at absl/testing/absltest.py:660:0-660:0 # type: (ContextManager[_T]) -> _T ^ ƛ Could not parse 1 file due to syntax errors! ƛ Found 350 type errors! numpy/__init__.pyi:9:0 Undefined import [21]: Could not find a module corresponding to import `__future__`. numpy/__init__.pyi:9:0 Undefined import [21]: Could not find a module corresponding to import `__future__`. numpy/__init__.pyi:11:0 Undefined import [21]: Could not find a module corresponding to import `typing`. numpy/__init__.pyi:11:0 Undefined import [21]: Could not find a module corresponding to import `typing`. numpy/__init__.pyi:15:4 Undefined or invalid type [11]: Annotation `float` is not defined as a type. numpy/__init__.pyi:15:4 Undefined or invalid type [11]: Annotation `float` is not defined as a type. numpy/__init__.pyi:16:9 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:16:9 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:20:14 Undefined or invalid type [11]: Annotation `Iterable` is not defined as a type. numpy/__init__.pyi:20:14 Undefined or invalid type [11]: Annotation `Iterable` is not defined as a type. numpy/__init__.pyi:21:3 Undefined name [18]: Global name `property` is not defined, or there is at least one control flow path that doesn't define `property`. numpy/__init__.pyi:21:3 Undefined name [18]: Global name `property` is not defined, or there is at least one control flow path that doesn't define `property`. numpy/__init__.pyi:22:21 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:22:21 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:29:23 Undefined or invalid type [11]: Annotation `int` is not defined as a type. numpy/__init__.pyi:29:23 Undefined or invalid type [11]: Annotation `int` is not defined as a type. numpy/__init__.pyi:32:25 Undefined or invalid type [11]: Annotation `float` is not defined as a type. numpy/__init__.pyi:32:25 Undefined or invalid type [11]: Annotation `float` is not defined as a type. numpy/__init__.pyi:73:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:73:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:73:25 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:73:25 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:76:27 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:76:27 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:79:27 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:79:27 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:82:18 Undefined or invalid type [11]: Annotation `int` is not defined as a type. numpy/__init__.pyi:82:18 Undefined or invalid type [11]: Annotation `int` is not defined as a type. numpy/__init__.pyi:85:14 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:85:14 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:85:31 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:85:31 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:85:56 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:85:56 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:91:28 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:91:28 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:91:42 Undefined or invalid type [11]: Annotation `list` is not defined as a type. numpy/__init__.pyi:91:42 Undefined or invalid type [11]: Annotation `list` is not defined as a type. numpy/__init__.pyi:94:38 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:94:38 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:97:12 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:97:12 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:97:50 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:97:50 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:100:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:100:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:100:25 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:100:25 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:103:14 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:103:14 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:103:31 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:103:31 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:103:49 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:103:49 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:106:24 Undefined or invalid type [11]: Annotation `int` is not defined as a type. numpy/__init__.pyi:106:24 Undefined or invalid type [11]: Annotation `int` is not defined as a type. numpy/__init__.pyi:112:11 Undefined or invalid type [11]: Annotation `int` is not defined as a type. numpy/__init__.pyi:112:11 Undefined or invalid type [11]: Annotation `int` is not defined as a type. numpy/__init__.pyi:119:18 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:119:18 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:122:16 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:122:16 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:122:30 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:122:30 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:125:20 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:125:20 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:125:37 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:125:37 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:126:18 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:126:18 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:129:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:129:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:129:25 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:129:25 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:132:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:132:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:132:28 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:132:28 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:132:53 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:132:53 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:135:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:135:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:135:28 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:135:28 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:135:53 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:135:53 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:138:16 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:138:16 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:138:30 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:138:30 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:141:15 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:141:15 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:141:36 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:141:36 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:141:46 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:141:46 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:144:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:144:11 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:144:25 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:144:25 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:148:14 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:148:14 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:151:12 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:151:12 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:151:26 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:151:26 Undefined or invalid type [11]: Annotation `ArrayLike` is not defined as a type. numpy/__init__.pyi:154:29 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:154:29 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:155:13 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:155:13 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:158:17 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:158:17 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. numpy/__init__.pyi:158:31 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:158:31 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:161:34 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/__init__.pyi:161:34 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. numpy/random.pyi:10:17 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/ddpg.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/ddpg.py:2:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/ddpg.py:135:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/estop/ddpg.py:135:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/estop/ddpg.py:135:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/estop/ddpg.py:135:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/estop/ddpg.py:149:11 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/ddpg.py:150:9 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/ddpg.py:152:16 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/ddpg.py:206:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/estop/ddpg.py:206:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/estop/ddpg.py:206:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/estop/ddpg.py:206:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/estop/ddpg.py:207:18 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/ddpg.py:207:18 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/frozenlake/actor_critic.py:1:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/frozenlake/frozenlake.py:3:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/frozenlake/frozenlake.py:7:8 Undefined name [18]: Global name `int` is not defined, or there is at least one control flow path that doesn't define `int`. research/estop/frozenlake/frozenlake.py:81:32 Undefined or invalid type [11]: Annotation `tuple` is not defined as a type. research/estop/frozenlake/frozenlake.py:81:52 Undefined or invalid type [11]: Annotation `State` is not defined as a type. research/estop/frozenlake/frozenlake.py:88:24 Undefined or invalid type [11]: Annotation `State` is not defined as a type. research/estop/frozenlake/frozenlake.py:88:39 Undefined or invalid type [11]: Annotation `Action` is not defined as a type. research/estop/frozenlake/frozenlake.py:88:50 Undefined or invalid type [11]: Annotation `State` is not defined as a type. research/estop/frozenlake/frozenlake.py:99:12 Undefined name [18]: Global name `Exception` is not defined, or there is at least one control flow path that doesn't define `Exception`. research/estop/frozenlake/frozenlake.py:101:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/estop/frozenlake/frozenlake.py:152:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/estop/frozenlake/plot_actor_critic_results.py:1:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/frozenlake/plot_actor_critic_results.py:2:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/frozenlake/plot_actor_critic_results.py:19:18 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/frozenlake/plot_actor_critic_results.py:55:6 Undefined attribute [16]: `int` has no attribute `__mul__`. research/estop/frozenlake/plot_actor_critic_results.py:58:37 Undefined name [18]: Global name `slice` is not defined, or there is at least one control flow path that doesn't define `slice`. research/estop/frozenlake/plot_q_learning_results.py:1:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/frozenlake/plot_q_learning_results.py:2:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/frozenlake/plot_q_learning_results.py:19:18 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/frozenlake/plot_q_learning_results.py:36:23 Undefined name [18]: Global name `int` is not defined, or there is at least one control flow path that doesn't define `int`. research/estop/frozenlake/plot_q_learning_results.py:42:44 Undefined name [18]: Global name `slice` is not defined, or there is at least one control flow path that doesn't define `slice`. research/estop/frozenlake/plot_q_learning_results.py:58:6 Undefined attribute [16]: `int` has no attribute `__mul__`. research/estop/frozenlake/q_learning.py:1:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/frozenlake/reinforce.py:1:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/frozenlake/run_actor_critic.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/frozenlake/run_actor_critic.py:8:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/frozenlake/run_actor_critic.py:9:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/frozenlake/run_actor_critic.py:10:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/frozenlake/run_actor_critic.py:11:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/frozenlake/run_expert_quality_vs_estop_perf.py:19:25 Undefined attribute [16]: `float` has no attribute `__mul__`. research/estop/frozenlake/run_expert_quality_vs_estop_perf.py:71:20 Undefined name [18]: Global name `None` is not defined, or there is at least one control flow path that doesn't define `None`. research/estop/frozenlake/run_expert_quality_vs_estop_perf.py:76:22 Undefined name [18]: Global name `slice` is not defined, or there is at least one control flow path that doesn't define `slice`. research/estop/frozenlake/run_expert_rollouts_vs_estop_perf.py:7:19 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/frozenlake/run_expert_rollouts_vs_estop_perf.py:21:25 Undefined attribute [16]: `float` has no attribute `__mul__`. research/estop/frozenlake/run_expert_rollouts_vs_estop_perf.py:48:44 Undefined name [18]: Global name `slice` is not defined, or there is at least one control flow path that doesn't define `slice`. research/estop/frozenlake/run_q_learning.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/frozenlake/run_q_learning.py:8:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/frozenlake/run_q_learning.py:9:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/frozenlake/run_q_learning.py:10:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/frozenlake/run_q_learning.py:11:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/ant/ddpg/run_batch.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/gym/ant/ddpg/run_batch.py:2:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/gym/ant/ddpg/run_batch.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/gym/ant/ddpg/run_batch.py:4:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/ant/ddpg/run_batch.py:5:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/ant/ddpg/run_gymstop_batch.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/gym/ant/ddpg/run_gymstop_batch.py:2:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/gym/ant/ddpg/run_gymstop_batch.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/gym/ant/ddpg/run_gymstop_batch.py:4:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/ant/ddpg/run_gymstop_batch.py:5:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/ddpg_training.py:3:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/ddpg_training.py:4:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/gym/ddpg_training.py:5:0 Undefined import [21]: Could not find a module corresponding to import `time`. research/estop/gym/ddpg_training.py:6:0 Undefined import [21]: Could not find a module corresponding to import `datetime`. research/estop/gym/ddpg_training.py:7:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/ddpg_training.py:24:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/estop/gym/ddpg_training.py:24:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/estop/gym/ddpg_training.py:24:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/estop/gym/ddpg_training.py:24:0 Undefined or invalid type [11]: Annotation `Optional` is not defined as a type. research/estop/gym/ddpg_training.py:25:9 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/gym/ddpg_training.py:25:9 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/gym/ddpg_training.py:26:7 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/gym/ddpg_training.py:26:7 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/gym/ddpg_training.py:27:15 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/gym/ddpg_training.py:27:15 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/gym/ddpg_training.py:28:14 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/gym/ddpg_training.py:28:14 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/gym/gym_wrappers.py:1:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/gym/gym_wrappers.py:11:47 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/gym/gym_wrappers.py:37:54 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/gym/gym_wrappers.py:57:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/estop/gym/gym_wrappers.py:57:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/estop/gym/gym_wrappers.py:57:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/estop/gym/gym_wrappers.py:57:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/estop/gym/gym_wrappers.py:58:12 Undefined or invalid type [11]: Annotation `str` is not defined as a type. research/estop/gym/gym_wrappers.py:58:12 Undefined or invalid type [11]: Annotation `str` is not defined as a type. research/estop/gym/gym_wrappers.py:59:21 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/gym/gym_wrappers.py:59:21 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/gym/gym_wrappers.py:65:29 Undefined or invalid type [11]: Annotation `str` is not defined as a type. research/estop/gym/gym_wrappers.py:65:53 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/gym/half_cheetah/ddpg/debug_run_estop.py:1:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/half_cheetah/ddpg/debug_run_estop.py:2:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/half_cheetah/ddpg/debug_run_estop.py:29:2 Undefined name [18]: Global name `print` is not defined, or there is at least one control flow path that doesn't define `print`. research/estop/gym/half_cheetah/ddpg/debug_run_estop.py:38:14 Undefined name [18]: Global name `int` is not defined, or there is at least one control flow path that doesn't define `int`. research/estop/gym/half_cheetah/ddpg/run_batch.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/gym/half_cheetah/ddpg/run_batch.py:2:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/gym/half_cheetah/ddpg/run_batch.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/gym/half_cheetah/ddpg/run_batch.py:4:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/half_cheetah/ddpg/run_batch.py:5:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/half_cheetah/ddpg/run_estop_batch.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/gym/half_cheetah/ddpg/run_estop_batch.py:2:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/gym/half_cheetah/ddpg/run_estop_batch.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/gym/half_cheetah/ddpg/run_estop_batch.py:4:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/half_cheetah/ddpg/run_estop_batch.py:5:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/half_cheetah/ddpg/run_estop_batch.py:76:8 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/gym/half_cheetah/ddpg/viz_results.py:1:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/half_cheetah/ddpg/viz_results.py:2:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/half_cheetah/ddpg/viz_results.py:32:2 Undefined name [18]: Global name `print` is not defined, or there is at least one control flow path that doesn't define `print`. research/estop/gym/half_cheetah/ddpg/viz_results.py:40:27 Undefined attribute [16]: `int` has no attribute `__mul__`. research/estop/gym/half_cheetah/ddpg/viz_results.py:42:6 Undefined attribute [16]: `int` has no attribute `__mul__`. research/estop/gym/half_cheetah/ddpg/viz_results.py:45:35 Undefined name [18]: Global name `slice` is not defined, or there is at least one control flow path that doesn't define `slice`. research/estop/gym/half_cheetah/ddpg/viz_results.py:48:15 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/gym/half_cheetah/random_policy.py:1:0 Undefined import [21]: Could not find a module corresponding to import `time`. research/estop/gym/half_cheetah/random_policy.py:6:9 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/gym/half_cheetah/random_policy.py:12:2 Undefined name [18]: Global name `print` is not defined, or there is at least one control flow path that doesn't define `print`. research/estop/gym/half_cheetah/viz_state_space.py:15:21 Undefined name [18]: Global name `len` is not defined, or there is at least one control flow path that doesn't define `len`. research/estop/gym/half_cheetah/viz_state_space.py:18:13 Undefined attribute [16]: `int` has no attribute `__mul__`. research/estop/gym/half_cheetah/viz_state_space.py:20:6 Undefined attribute [16]: `np.ndarray` has no attribute `__iter__`. research/estop/gym/half_cheetah/viz_state_space.py:21:45 Undefined attribute [16]: `int` has no attribute `__sub__`. research/estop/gym/hopper/ddpg/run_batch.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/gym/hopper/ddpg/run_batch.py:2:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/gym/hopper/ddpg/run_batch.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/gym/hopper/ddpg/run_batch.py:4:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/hopper/ddpg/run_batch.py:5:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/gym/hopper/ddpg/run_gymstop_batch.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/gym/hopper/ddpg/run_gymstop_batch.py:2:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/gym/hopper/ddpg/run_gymstop_batch.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/gym/hopper/ddpg/run_gymstop_batch.py:4:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/gym/hopper/ddpg/run_gymstop_batch.py:5:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/mdp.py:1:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/mdp.py:11:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/estop/mdp.py:11:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/estop/mdp.py:11:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/estop/mdp.py:11:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/estop/mdp.py:13:8 Undefined or invalid type [11]: Annotation `Callable` is not defined as a type. research/estop/mdp.py:13:8 Undefined or invalid type [11]: Annotation `Callable` is not defined as a type. research/estop/mdp.py:14:10 Undefined or invalid type [11]: Annotation `Callable` is not defined as a type. research/estop/mdp.py:14:10 Undefined or invalid type [11]: Annotation `Callable` is not defined as a type. research/estop/pendulum/env.py:10:31 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/pendulum/env.py:11:33 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/pendulum/env.py:12:34 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/pendulum/env.py:13:35 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/pendulum/env.py:14:36 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/pendulum/env.py:15:29 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/pendulum/env.py:16:44 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/estop/pendulum/env.py:67:30 Undefined attribute [16]: `float` has no attribute `__sub__`. research/estop/pendulum/plot_full_vs_estop_ddpg.py:1:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/pendulum/plot_full_vs_estop_ddpg.py:2:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/pendulum/plot_full_vs_estop_ddpg.py:33:2 Undefined name [18]: Global name `print` is not defined, or there is at least one control flow path that doesn't define `print`. research/estop/pendulum/plot_full_vs_estop_ddpg.py:47:6 Undefined attribute [16]: `int` has no attribute `__mul__`. research/estop/pendulum/plot_full_vs_estop_ddpg.py:50:36 Undefined name [18]: Global name `slice` is not defined, or there is at least one control flow path that doesn't define `slice`. research/estop/pendulum/plot_full_vs_estop_ddpg.py:53:15 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/pendulum/run_ddpg.py:1:0 Undefined import [21]: Could not find a module corresponding to import `time`. research/estop/pendulum/run_ddpg.py:18:14 Undefined attribute [16]: `int` has no attribute `__pow__`. research/estop/pendulum/run_ddpg.py:30:31 Undefined attribute [16]: `float` has no attribute `__mul__`. research/estop/pendulum/run_ddpg.py:40:35 Undefined attribute [16]: `float` has no attribute `__truediv__`. research/estop/pendulum/run_ddpg_batch.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/pendulum/run_ddpg_batch.py:2:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/pendulum/run_ddpg_batch.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/pendulum/run_ddpg_batch.py:4:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/pendulum/run_ddpg_batch.py:5:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/pendulum/run_estop_ddpg.py:1:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/pendulum/run_estop_ddpg.py:12:19 Undefined attribute [16]: `float` has no attribute `__pow__`. research/estop/pendulum/run_estop_ddpg_batch.py:1:0 Undefined import [21]: Could not find a module corresponding to import `functools`. research/estop/pendulum/run_estop_ddpg_batch.py:2:0 Undefined import [21]: Could not find a module corresponding to import `multiprocessing`. research/estop/pendulum/run_estop_ddpg_batch.py:3:0 Undefined import [21]: Could not find a module corresponding to import `os`. research/estop/pendulum/run_estop_ddpg_batch.py:4:0 Undefined import [21]: Could not find a module corresponding to import `pathlib`. research/estop/pendulum/run_estop_ddpg_batch.py:5:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/pendulum/viz_policy_rollouts.py:1:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/pendulum/viz_policy_rollouts.py:19:40 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/pendulum/viz_policy_rollouts.py:23:12 Undefined name [18]: Global name `int` is not defined, or there is at least one control flow path that doesn't define `int`. research/estop/pendulum/viz_policy_rollouts.py:25:0 Undefined name [18]: Global name `print` is not defined, or there is at least one control flow path that doesn't define `print`. research/estop/pendulum/viz_policy_rollouts.py:39:31 Undefined attribute [16]: `int` has no attribute `__mul__`. research/estop/pendulum/viz_support_set.py:1:0 Undefined import [21]: Could not find a module corresponding to import `pickle`. research/estop/pendulum/viz_support_set.py:14:0 Undefined name [18]: Global name `print` is not defined, or there is at least one control flow path that doesn't define `print`. research/estop/pendulum/viz_support_set.py:21:40 Undefined name [18]: Global name `range` is not defined, or there is at least one control flow path that doesn't define `range`. research/estop/pendulum/viz_support_set.py:25:12 Undefined name [18]: Global name `int` is not defined, or there is at least one control flow path that doesn't define `int`. research/estop/pendulum/viz_support_set.py:45:29 Undefined name [18]: Global name `slice` is not defined, or there is at least one control flow path that doesn't define `slice`. research/estop/replay_buffers.py:1:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/estop/replay_buffers.py:18:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/estop/replay_buffers.py:18:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/estop/replay_buffers.py:18:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/estop/replay_buffers.py:18:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/estop/replay_buffers.py:24:8 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/replay_buffers.py:24:8 Undefined or invalid type [11]: Annotation `int` is not defined as a type. research/estop/replay_buffers.py:56:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/gan_with_the_wind/marginal_vae.py:1:1 Analysis failure [30]: Terminating analysis because type `float` is not defined. research/gan_with_the_wind/simple_vae.py:1:1 Analysis failure [30]: Terminating analysis because type `float` is not defined. research/statistax/__init__.py:1:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/statistax/__init__.py:7:23 Undefined attribute [16]: `float` has no attribute `__mul__`. research/statistax/__init__.py:19:10 Undefined name [18]: Global name `NotImplementedError` is not defined, or there is at least one control flow path that doesn't define `NotImplementedError`. research/statistax/__init__.py:27:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/statistax/__init__.py:27:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/statistax/__init__.py:27:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/statistax/__init__.py:27:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/statistax/__init__.py:41:19 Undefined attribute [16]: `tuple` has no attribute `__add__`. research/statistax/__init__.py:44:12 Undefined attribute [16]: `float` has no attribute `__mul__`. research/statistax/__init__.py:50:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/statistax/__init__.py:50:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/statistax/__init__.py:50:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/statistax/__init__.py:50:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/statistax/__init__.py:64:19 Undefined attribute [16]: `tuple` has no attribute `__add__`. research/statistax/__init__.py:76:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/statistax/__init__.py:76:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/statistax/__init__.py:76:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/statistax/__init__.py:76:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/statistax/__init__.py:78:7 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/statistax/__init__.py:78:7 Undefined or invalid type [11]: Annotation `float` is not defined as a type. research/statistax/__init__.py:89:43 Undefined attribute [16]: `tuple` has no attribute `__add__`. research/statistax/__init__.py:97:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/statistax/__init__.py:97:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/statistax/__init__.py:97:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/statistax/__init__.py:97:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/statistax/__init__.py:100:13 Undefined or invalid type [11]: Annotation `Callable` is not defined as a type. research/statistax/__init__.py:100:13 Undefined or invalid type [11]: Annotation `Callable` is not defined as a type. research/statistax/__init__.py:104:11 Undefined attribute [16]: `tuple` has no attribute `__eq__`. research/statistax/__init__.py:136:28 Undefined or invalid type [11]: Annotation `tuple` is not defined as a type. research/statistax/__init__.py:144:51 Undefined or invalid type [11]: Annotation `Iterable` is not defined as a type. research/statistax/__init__.py:145:11 Undefined attribute [16]: `Distribution` has no attribute `__class__`. research/statistax/__init__.py:152:0 Analysis failure [30]: Terminating analysis because type `enum.Enum` is not defined. research/statistax/__init__.py:152:0 Incompatible constructor annotation [17]: `__init__` is annotated as returning `unknown`, but it should return `None`. research/statistax/__init__.py:152:0 Undefined or invalid type [11]: Annotation `NamedTuple` is not defined as a type. research/statistax/__init__.py:152:0 Undefined or invalid type [11]: Annotation `typing.Optional` is not defined as a type. research/statistax/__init__.py:168:33 Undefined attribute [16]: `tuple` has no attribute `__add__`. research/statistax/__init__.py:184:12 Undefined attribute [16]: `float` has no attribute `__mul__`. research/utils.py:1:0 Undefined import [21]: Could not find a module corresponding to import `__future__`. research/utils.py:3:0 Undefined import [21]: Could not find a module corresponding to import `typing`. research/utils.py:9:10 Undefined name [18]: Global name `NotImplementedError` is not defined, or there is at least one control flow path that doesn't define `NotImplementedError`. ```
MaggieMoss commented 4 years ago

Hi @samuela looks like this might have been the result of a typeshed update.

Couple of questions - do these errors persist in later versions of Pyre? Are all of the newly reported errors found in stubs?

MaggieMoss commented 4 years ago

Closing this for now. @samuela feel free to re-open if the issue has still not been solved :)