Skip to content

Commit f851993

Browse files
committed
Update black to 25.9.0
We update black formatter to the latest version for better maintainability in the future. In particular, we want to avoid big jumps in formatting with future versions.
1 parent ff3fc1c commit f851993

7 files changed

Lines changed: 24 additions & 11 deletions

File tree

icontract/_checkers.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Provide functions to add/find contract checkers."""
2+
23
import contextvars
34
import functools
45
import inspect
@@ -1289,15 +1290,21 @@ def add_invariant_checks(cls: ClassT) -> None:
12891290

12901291
for name, prop in names_properties:
12911292
new_prop = property(
1292-
fget=_decorate_with_invariants(func=prop.fget, is_init=False)
1293-
if prop.fget
1294-
else None,
1295-
fset=_decorate_with_invariants(func=prop.fset, is_init=False)
1296-
if prop.fset
1297-
else None,
1298-
fdel=_decorate_with_invariants(func=prop.fdel, is_init=False)
1299-
if prop.fdel
1300-
else None,
1293+
fget=(
1294+
_decorate_with_invariants(func=prop.fget, is_init=False)
1295+
if prop.fget
1296+
else None
1297+
),
1298+
fset=(
1299+
_decorate_with_invariants(func=prop.fset, is_init=False)
1300+
if prop.fset
1301+
else None
1302+
),
1303+
fdel=(
1304+
_decorate_with_invariants(func=prop.fdel, is_init=False)
1305+
if prop.fdel
1306+
else None
1307+
),
13011308
doc=prop.__doc__,
13021309
)
13031310
setattr(cls, name, new_prop)

icontract/_decorators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Define public decorators."""
2+
23
import inspect
34
import reprlib
45
import traceback

icontract/_metaclass.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Define the metaclass necessary to inherit the contracts from the base classes."""
2+
23
import abc
34
import inspect
45
import sys

icontract/_represent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Handle representations necessary for informative error messages."""
2+
23
import ast
34
import inspect
45
import re
@@ -405,7 +406,7 @@ def find_lambda_condition(
405406

406407

407408
def inspect_lambda_condition(
408-
condition: Callable[..., Any]
409+
condition: Callable[..., Any],
409410
) -> Optional[ConditionLambdaInspection]:
410411
"""
411412
Try to extract the source code of the condition as lambda.

icontract/_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Define data structures shared among the modules."""
2+
23
import enum
34
import inspect
45
import reprlib

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
https://packaging.python.org/en/latest/distributing.html
55
https://github.com/pypa/sampleproject
66
"""
7+
78
import os
89
import sys
910

@@ -67,7 +68,7 @@
6768
"astor==0.8.1",
6869
"numpy>=1,<2",
6970
'mypy==1.5.1;python_version>="3.8"',
70-
'black==23.9.1;python_version>="3.8"',
71+
'black==25.9.0;python_version>="3.8"',
7172
'deal>=4,<5;python_version>="3.8"',
7273
'asyncstdlib==3.9.1;python_version>="3.8"',
7374
]

tests/mock.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Provide mock structures used accross the tests."""
2+
23
from typing import List, Union
34

45

0 commit comments

Comments
 (0)