1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
From 3eff4359d81cbcb13bf080d6f683826c14202966 Mon Sep 17 00:00:00 2001
From: Alexandre Detiste <alexandre.detiste@gmail.com>
Date: Wed, 29 Oct 2025 09:28:29 +0100
Subject: [PATCH] replaced old "toml" with newer "tomli"
--- a/pytest_black.py
+++ b/pytest_black.py
@@ -7,7 +7,7 @@
# third-party imports
import pytest
-import toml
+import tomllib as toml
HISTKEY = "black/mtimes"
@@ -52,7 +52,7 @@
super(BlackItem, self).__init__(**kwargs)
self.add_marker("black")
try:
- with open("pyproject.toml") as toml_file:
+ with open("pyproject.toml", "rb") as toml_file:
settings = toml.load(toml_file)["tool"]["black"]
if "include" in settings.keys():
settings["include"] = self._re_fix_verbose(settings["include"])
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,6 @@
# Minimum requirement on black 19.3b0 or later is not declared here as
# workaround for https://github.com/pypa/pipenv/issues/3928
'black; python_version >= "3.6"',
- "toml",
],
use_scm_version=True,
classifiers=[
|