You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a use-case that I can't see works with hatch (multiple inheritance). The challenge here is really if one wants the lint environment to be detached.
Would like to have three environments: default, dev and lint where
Would need to do something like below as we need to keep environments lint and test a while for backwards CI/CD compatibility. That is, dev would have to use several templates (multiple inheritance). Dependencies should be prioritized according to order in template(s) = "default, lint, test"
dependencies = [
"ruamel.yaml==0.18.6",
]
[tool.hatch.envs.test]
dependencies = ["pytest==8.3.2", "pytest-sugar==1.0.0", "pytest-cov==5.0.0"]
[tool.hatch.envs.lint]
detached = truedependencies = [
"black==24.8.0",
"flake8==7.1.1",
"flake8-pyproject==1.2.3",
"mypy==1.11.1",
]
[tool.hatch.envs.dev]
template = "default, lint, test"# default, might not be needed since its inherited by test
If one is ok with linting not being detached then the following would work:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Have a use-case that I can't see works with hatch (multiple inheritance). The challenge here is really if one wants the lint environment to be detached.
Would like to have three environments: default, dev and lint where
lint = black, flake8 etc
dev = default + lint
i.e.
Would need to do something like below as we need to keep environments lint and test a while for backwards CI/CD compatibility. That is,
dev
would have to use several templates (multiple inheritance). Dependencies should be prioritized according to order intemplate(s) = "default, lint, test"
If one is ok with linting not being detached then the following would work:
Beta Was this translation helpful? Give feedback.
All reactions