{"image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpc.atsuhiro-me.net%2Fentry%2F2021%2F05%2F26%2F191624\" title=\"(mypy)Relative import climbs too many namespaces - \u307f\u30fc\u306e\u307a\u30fc\u3058\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","version":"1.0","author_url":"https://blog.hatena.ne.jp/atsuhiro-me/","blog_title":"\u307f\u30fc\u306e\u307a\u30fc\u3058","title":"(mypy)Relative import climbs too many namespaces","author_name":"atsuhiro-me","type":"rich","description":"mypy\u304c\u201dRelative import climbs too many namespaces\"\u3068\u30a8\u30e9\u30fc\u3057\u3066\uff0c\u6c17\u3065\u304f\u306e\u306b\u6642\u9593\u304c\u304b\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u3057\u3066\u304a\u304d\u307e\u3059\uff0e \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u69cb\u6210\u3067\u3059\uff0e src \u2514\u2500\u2500b.py a.py b.py\u306e\u4e2d\u8eab\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff0e from ..a import foo foo() \u539f\u56e0\u306f\u5358\u7d14\u3067\uff0csrc/\u306b__init__.py\u304c\u5b58\u5728\u3057\u305f\u3044\u305f\u3081\uff0csrc\u304c\u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u306f\u3089\u306a\u305a\uff0c\u76f8\u5bfe\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u30a8\u30e9\u30fc\u3059\u308b\u305f\u3081\u306b\u767a\u751f\u3057\u307e\u3059\uff0e \u3057\u305f\u304c\u3063\u3066\uff0c__init__.py\u3092\u8ffd\u52a0\u3059\u308b\u3068\u89e3\u6c7a\u3057\u307e\u3059\uff0e src \u251c\u2500\u2500 __init__.py \u2514\u2500\u2500b.py a.py","blog_url":"https://pc.atsuhiro-me.net/","url":"https://pc.atsuhiro-me.net/entry/2021/05/26/191624","width":"100%","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","published":"2021-05-26 19:16:24","categories":["Python"]}