fix(python): update default python config
This commit is contained in:
@@ -5,9 +5,8 @@ conditions = ["file(pyproject.toml)"]
|
|||||||
conditions = [
|
conditions = [
|
||||||
"file(pyproject.toml) | get(build-system.build-backend) | equal(poetry.core.masonry.api)",
|
"file(pyproject.toml) | get(build-system.build-backend) | equal(poetry.core.masonry.api)",
|
||||||
]
|
]
|
||||||
variables.python_version = "file(pyproject.toml) | get(tool.poetry.dependencies.python) | search((\\d.\\d))"
|
variables.python_version = "file(pyproject.toml) | get(tool.poetry.dependencies.python) | search((\\d+.\\d+))"
|
||||||
commands = [
|
commands = [
|
||||||
"poetry env use system",
|
|
||||||
"poetry env use {python_version}",
|
"poetry env use {python_version}",
|
||||||
"poetry install",
|
"poetry install",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ __all__ = (
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class PresetResolverConfig:
|
class PresetResolverConfig:
|
||||||
deafult: bool = True
|
default: bool = True
|
||||||
user: bool = True
|
user: bool = True
|
||||||
project: bool = True
|
project: bool = True
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ class PresetResolver:
|
|||||||
self._config = config or PresetResolverConfig()
|
self._config = config or PresetResolverConfig()
|
||||||
|
|
||||||
def iter_sources(self) -> Iterable[Path]:
|
def iter_sources(self) -> Iterable[Path]:
|
||||||
if self._config.deafult:
|
if self._config.default:
|
||||||
for filepath in (Path(__file__).parent / "default").iterdir():
|
for filepath in (Path(__file__).parent / "default").iterdir():
|
||||||
yield filepath
|
yield filepath
|
||||||
if self._config.user:
|
if self._config.user:
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "project-manager"
|
name = "project-manager"
|
||||||
version = "0.1.5"
|
version = "0.1.6"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["shmyga <shmyga.z@gmail.com>"]
|
authors = ["shmyga <shmyga.z@gmail.com>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
Reference in New Issue
Block a user