Skip to content

Commit e7983e5

Browse files
authored
Temporary cap for pyproject-fmt (#104)
2 parents 9658565 + 4afbfde commit e7983e5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
=========
44

5+
Version 0.15
6+
============
7+
8+
* Due to the change in API for ``pyproject-fmt`` introduce a dependency cap.
9+
510
Version 0.14
611
============
712

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ all =
7474
# atoml @ git+https://github.com/abravalheri/atoml@table-common-ancestor#egg=atoml
7575
tomli-w>=0.4.0,<2
7676
experimental =
77-
pyproject-fmt>=0.4.0; python_version>="3.7"
77+
pyproject-fmt>=0.4.0,<2; python_version>="3.7"
7878

7979
# Add here test requirements (semicolon/line-separated)
8080
testing =

src/ini2toml/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def critical_logging():
8484
}
8585

8686
try:
87-
from pyproject_fmt import Config, format_pyproject
87+
import pyproject_fmt # noqa
8888

8989
META["auto_format"] = dict(
9090
flags=("-F", "--auto-format"),
@@ -95,6 +95,8 @@ def critical_logging():
9595

9696
def apply_auto_formatting(text: str) -> str:
9797
try:
98+
from pyproject_fmt import Config, format_pyproject
99+
98100
return format_pyproject(Config(Path("pyproject.toml"), text))
99101
except Exception as ex: # pragma: no cover
100102
_logger.debug(f"pyproject-fmt failed: {ex}", exc_info=True)

0 commit comments

Comments
 (0)