Skip to content

Commit afbea1a

Browse files
committed
chore: declare that pandora is typed
Due to the change of layout, mypy considers pandora to be an external library so I added the `py.typed` [marker](https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports). I had to change `meson.build` in order the file `py.typed` to be included into the wheel so that when used as a library, pandora will be declared typed. Unfortunately, mypy and pylint still does not found pandora when checking tests. This bug is referenced for [setuptools](python/mypy#13392), it could be the same for meson-python but tagged as `wontfix`: mesonbuild/meson-python#555
1 parent 60451e4 commit afbea1a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

meson.build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ pybind11_dep = dependency('pybind11')
1818
doctest_dep = dependency('doctest', required: get_option('build_cpp_tests'))
1919
python_dep = py.dependency(embed: true, required: get_option('build_cpp_tests'))
2020

21-
install_subdir(
22-
'src/pandora',
23-
install_dir: py.get_install_dir() / 'pandora',
24-
strip_directory: true,
25-
)
21+
install_dir = py.get_install_dir() / 'pandora'
22+
23+
install_subdir('src/pandora', install_dir: install_dir, strip_directory: true)
24+
25+
install_data('src/pandora/py.typed', install_dir: install_dir)
2626

2727
subdir('src/pandora/cpp')
2828

src/pandora/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)