gopidesupavan commented on issue #53241: URL: https://github.com/apache/airflow/issues/53241#issuecomment-3069910852
> FYI > > I got help from ai. but. I have checked all link and about contents. it can be helpful to have a intresting about type hinting. > > ## 🧩 Namespace Resolution Issues Across Type Checkers > > 🔎 These issues all relate to [PEP 420](https://peps.python.org/pep-0420/), which introduced **namespace packages**—packages split across multiple directories. > > Tools like `mypy` and `pyright` often struggle with correctly resolving these when both user code and installed libraries share the same namespace (e.g. `google.cloud`). > > Tool / Source Issue Link Summary Relevance to Airflow > **PEP 420** [PEP 420 – Implicit Namespace Packages](https://peps.python.org/pep-0420/) Introduces namespace packages that allow splitting a package across multiple directories. Airflow's `providers/google/cloud/...` overlaps with `google-cloud-*` libraries in site-packages. > **mypy** [#10360](https://github.com/python/mypy/issues/10360) Fails to resolve `google.cloud.logging` due to namespace conflicts; only the first path is used. Airflow's `providers/google/cloud` may shadow installed `google-cloud-*` modules. > **mypy** [#12985](https://github.com/python/mypy/issues/12985) Reports missing attributes like `google.cloud.firestore` due to resolution issues or missing stubs. Affects modules using third-party Google libraries. > **pyright** [#2882](https://github.com/microsoft/pyright/issues/2882) Cannot distinguish between user-defined and installed `google.cloud` modules. Impacts Airflow when pyright is used in monorepos or complex provider structures. > **StackOverflow** [#75835248](https://stackoverflow.com/questions/75835248/...) `mypy` fails to detect type mismatches due to misinterpreted namespace packages. Matches Airflow’s namespace layout where overlapping paths confuse the type checker. yes exactly it conflicts the namespaces :) , have modified the imports to use full path https://github.com/apache/airflow/pull/53338. will see probably we can go with alias technique thats the simplest one. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
