Commit 31465a4c by Joseph M LaFreniere Committed by GitHub

Remove `src/poetry/__init__.py` to convert to namespace package (#5614)

* Remove `poetry.__init__` to convert to namespace package
* Add mypy settings to account for namespace package
* Update flake8 pre-commit config to allow namespace package
* Mark poetry-core as a third-party package in isort's config
parent 5b8555c0
...@@ -36,7 +36,6 @@ repos: ...@@ -36,7 +36,6 @@ repos:
- flake8-bugbear==22.4.25 - flake8-bugbear==22.4.25
- flake8-comprehensions==3.10.0 - flake8-comprehensions==3.10.0
- flake8-eradicate==1.2.1 - flake8-eradicate==1.2.1
- flake8-no-pep420==2.3.0
- flake8-quotes==3.3.1 - flake8-quotes==3.3.1
- flake8-simplify==0.19.2 - flake8-simplify==0.19.2
- flake8-tidy-imports==4.8.0 - flake8-tidy-imports==4.8.0
......
...@@ -105,6 +105,7 @@ lines_between_types = 1 ...@@ -105,6 +105,7 @@ lines_between_types = 1
lines_after_imports = 2 lines_after_imports = 2
src_paths = ["src", "tests"] src_paths = ["src", "tests"]
extend_skip = ["setup.py"] extend_skip = ["setup.py"]
known_third_party = ["poetry.core"]
[tool.black] [tool.black]
...@@ -117,6 +118,9 @@ force-exclude = ''' ...@@ -117,6 +118,9 @@ force-exclude = '''
[tool.mypy] [tool.mypy]
files = "src" files = "src"
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
show_error_codes = true show_error_codes = true
strict = true strict = true
enable_error_code = [ enable_error_code = [
......
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
# When editing this file make sure line 1 keeps unchanged.
# Setting __path__ must take place in the first line. No line breaks are allowed either.
# Otherwise, IDEs like PyCharm are unable to follow imports to poetry.core.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment