Last active
September 29, 2023 07:47
-
-
Save heliocastro/d15255ddf11e0d0b1ec6f23b809d5e50 to your computer and use it in GitHub Desktop.
Poetry optional build dependency issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[build-system] | |
requires = ["poetry-core"] | |
build-backend = "poetry.core.masonry.api" | |
[tool.poetry] | |
name = "mylib-core" | |
version = "1.2.1" | |
description = "Mylib for test purposes" | |
authors = [ "Helio Chissini de Castro <heliocastro@gmail.com>"] | |
readme = "README.md" | |
license = "MIT" | |
packages = [ { include = "mylib", from = "src" } ] | |
keywords = ["mylib"] | |
classifiers = [ | |
"Development Status :: 4 - Beta", | |
"Environment :: Console", | |
"License :: OSI Approved :: MIT License", | |
"Operating System :: OS Independent", | |
"Programming Language :: Python :: 3 :: Only", | |
"Programming Language :: Python :: 3.10", | |
"Programming Language :: Python :: 3.11", | |
"Programming Language :: Python :: 3.12", | |
"Topic :: Software Development :: Libraries :: Python Modules", | |
"Typing :: Typed" | |
] | |
[tool.poetry.dependencies] | |
python = "^3.10" | |
click = "^8.1.3" | |
toml = "^0.10.2" | |
rich = "*" | |
python-magic = "^0.4.27" | |
appdirs = "^1.4.4" | |
pydantic = "^2.4.2" | |
urllib3 = "=1.26.16" | |
importlib-metadata = "^6.7.0" | |
pyyaml = "^6.0" | |
pygithub = {version = "^1.59.1", optional = true} | |
atlassian-python-api = {version = "^3.41.2", optional = true} | |
[tool.poetry.extras] | |
atlassian = ["atlassian-python-api"] | |
github = ["pygithub"] | |
[tool.poetry.group.dev.dependencies] | |
pre-commit = "*" | |
mypy = "*" | |
pycodestyle = "*" | |
pylint = "*" | |
black = "*" | |
pytest-mypy = "*" | |
types-toml = "*" | |
pytest-cov = "*" | |
ruff = "*" | |
[tool.poetry.scripts] | |
mylib = "mylib.application:main" | |
[tool.isort] | |
multi_line_output = 3 | |
include_trailing_comma = true | |
force_grid_wrap = 0 | |
use_parentheses = true | |
line_length = 120 | |
[tool.black] | |
target-version = ["py310"] | |
line-length = 120 | |
include = '\.pyi?$' | |
exclude = ''' | |
( | |
/( | |
\.eggs # exclude a few common directories in the | |
| \.git # root of the project | |
| \.hg | |
| \.mypy_cache | |
| \.tox | |
| \.venv | |
| _build | |
| buck-out | |
| build | |
| dist | |
)/ | |
| foo.py # also separately exclude a file named foo.py in | |
# the root of the project | |
) | |
''' | |
[tool.pytest.ini_options] | |
addopts = [ | |
"--import-mode=importlib", | |
] | |
log_cli = true | |
log_cli_level = "INFO" | |
pythonpath = "src" | |
[tool.pylint.messages_control] | |
disable = [ | |
"abstract-method", | |
"arguments-differ", | |
"attribute-defined-outside-init", | |
"blacklisted-name", | |
"chained-comparison", | |
"duplicate-code", | |
"eval-used", | |
"exec-used", | |
"expression-not-assigned", | |
"fixme", | |
"global-statement", | |
"invalid-name", | |
"import-error", | |
"logging-fstring-interpolation", | |
"missing-docstring", | |
"no-member", | |
"no-name-in-module", | |
"protected-access", | |
"redefined-argument-from-local", | |
"redefined-outer-name", | |
"reimported", | |
"stop-iteration-return", | |
"too-few-public-methods", | |
"too-many-ancestors", | |
"too-many-arguments", | |
"too-many-branches", | |
"too-many-instance-attributes", | |
"too-many-lines", | |
"too-many-locals", | |
"too-many-return-statements", | |
"too-many-statements", | |
"unexpected-special-method-signature", | |
"unspecified-encoding" | |
] | |
[tool.mypy] | |
follow_imports = "normal" | |
strict_optional = true | |
warn_redundant_casts = true | |
warn_unused_ignores = true | |
disallow_any_generics = true | |
check_untyped_defs = true | |
no_implicit_reexport = true | |
disallow_untyped_defs = true | |
ignore_missing_imports = true | |
[tool.ruff.mccabe] | |
# Unlike Flake8, default to a complexity level of 10. | |
max-complexity = 10 | |
[tool.ruff] | |
fix = true | |
line-length = 120 | |
ignore = [] | |
extend-select = [ | |
"E", # pycodestyle error | |
"W", # pycodestyle warning | |
"F", # pyflakes | |
"A", # flakes8-builtins | |
"COM", # flakes8-commas | |
"C4", # flake8-comprehensions | |
"Q", # flake8-quotes | |
"SIM", # flake8-simplify | |
"PTH", # flake8-use-pathlib | |
"I", # isort | |
"N", # pep8 naming | |
"UP", # pyupgrade | |
"S", # bandit | |
] | |
# Exclude a variety of commonly ignored directories. | |
extend-exclude = [ | |
".bzr", | |
".direnv", | |
".eggs", | |
".git", | |
".hg", | |
".mypy_cache", | |
".nox", | |
".pants.d", | |
".ruff_cache", | |
".svn", | |
".tox", | |
".venv", | |
"__pypackages__", | |
"_build", | |
"buck-out", | |
"build", | |
"dist", | |
"node_modules", | |
"venv", | |
] | |
per-file-ignores = {} | |
# Allow unused variables when underscore-prefixed. | |
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | |
# Assume Python 3.10. | |
target-version = "py310" | |
[tool.ruff.flake8-tidy-imports] | |
ban-relative-imports = "all" | |
[tool.ruff.isort] | |
required-imports = ["from __future__ import annotations"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment