docs: some documentation/thoughts on properly implementing overlay packages

This commit is contained in:
Dima Gerasimov 2023-12-20 02:06:41 +00:00
parent a843407e40
commit f30d9b5b5b
12 changed files with 237 additions and 0 deletions

View file

@ -0,0 +1,17 @@
from setuptools import setup, find_namespace_packages # type: ignore
def main() -> None:
pkgs = find_namespace_packages('src')
pkg = min(pkgs)
setup(
name='hpi-overlay',
zip_safe=False,
packages=pkgs,
package_dir={'': 'src'},
package_data={pkg: ['py.typed']},
)
if __name__ == '__main__':
main()

View file

View file

@ -0,0 +1,8 @@
print(f'[overlay] {__name__} hello')
from .common import merge
def tweets() -> list[str]:
from . import gdpr
from . import talon
return merge(gdpr, talon)

View file

@ -0,0 +1,9 @@
print(f'[overlay] {__name__} hello')
def tweets() -> list[str]:
return [
'talon tweet 1',
'talon tweet 2',
]
trigger_mypy_error: str = 123