mirror of
https://github.com/MousaZeidBaker/poetry-plugin-up.git
synced 2025-10-05 21:32:40 +02:00
fix: Path.write_text does not have newline kwarg in 3.9
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "poetry-plugin-up"
|
||||
version = "0.9.0"
|
||||
version = "0.8.0"
|
||||
description = "Poetry plugin that updates dependencies and bumps their versions in pyproject.toml file"
|
||||
authors = ["Mousa Zeid Baker"]
|
||||
packages = [
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
@@ -48,7 +49,12 @@ def tmp_pyproject_path(
|
||||
tmp_pyproject_path = (
|
||||
tmp_path_factory.mktemp("simple_project") / "pyproject.toml"
|
||||
)
|
||||
tmp_pyproject_path.write_text(pyproject_content.as_string(), newline="\n")
|
||||
if sys.version_info >= (3, 10):
|
||||
tmp_pyproject_path.write_text(
|
||||
pyproject_content.as_string(), newline="\n"
|
||||
)
|
||||
else:
|
||||
tmp_pyproject_path.write_text(pyproject_content.as_string())
|
||||
return tmp_pyproject_path
|
||||
|
||||
|
||||
@@ -78,9 +84,12 @@ def tmp_pyproject_path_v2(
|
||||
tmp_pyproject_path = (
|
||||
tmp_path_factory.mktemp("simple_project_poetry_v2") / "pyproject.toml"
|
||||
)
|
||||
tmp_pyproject_path.write_text(
|
||||
pyproject_content_v2.as_string(), newline="\n"
|
||||
)
|
||||
if sys.version_info >= (3, 10):
|
||||
tmp_pyproject_path.write_text(
|
||||
pyproject_content_v2.as_string(), newline="\n"
|
||||
)
|
||||
else:
|
||||
tmp_pyproject_path.write_text(pyproject_content_v2.as_string())
|
||||
return tmp_pyproject_path
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user