-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
22 lines (13 loc) · 1.01 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
put 3rd party stubs in this directory needed to pass mypy on Github Actions.
in the Github Actions the MYPYPATH is set to this directory.
for local testing, put the *.pyi Files into another central directory and set the mypy path accordingly.
the reason for that is, that a certain *.pyi have to be only found once by mypy, otherwise it will throw an error.
lets say, we have an external module "external_test" and we created an "external_test.pyi" stub file.
the module "external_test" is used in project_a, and project_b, and package_a imports package_b
-- projects -- stub_directory -- external_test.pyi
|
-- project_A ------- package_a_dir --- 3rd_party_stubs --- external_test.pyi
|
-- project_B ------- package_b_dir --- 3rd_party_stubs --- external_test.pyi
for travis test of project_A we need to set the MYPYPATH to .../projects/project_A/3rd_party_stubs
for local tests, we need to set the MYPYPATH to .../projects/stub_directory , not to find external_test.pyi twice.