Skip to content

Commit 16835d9

Browse files
committed
refractor
1 parent 8cafec0 commit 16835d9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
put 3rd party stubs in this directory needed to pass mypy on travis.
2+
3+
in the travis.yml the MYPYPATH is set to this directory.
4+
5+
for local testing, put the *.pyi Files into another central directory and set the mypy path accordingly.
6+
the reason for that is, that a certain *.pyi have to be only found once by mypy, otherwise it will throw an error.
7+
8+
lets say, we have an external module "external_test" and we created an "external_test.pyi" stub file.
9+
10+
the module "external_test" is used in project_a, and project_b, and package_a imports package_b
11+
12+
13+
-- projects -- stub_directory -- external_test.pyi
14+
|
15+
-- project_A ------- package_a_dir --- 3rd_party_stubs --- external_test.pyi
16+
|
17+
-- project_B ------- package_b_dir --- 3rd_party_stubs --- external_test.pyi
18+
19+
20+
for travis test of project_A we need to set the MYPYPATH to .../projects/project_A/package_a_dir/3rd_party_stubs
21+
22+
for local tests, we need to set the MYPYPATH to .../projects/stub_directory , not to find external_test.pyi twice.

0 commit comments

Comments
 (0)