Skip to content

Commit 4cf65f0

Browse files
committed
chore: auto-fix (ruff)
1 parent 93d275e commit 4cf65f0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/fuzzylogic/truth.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
1-
21
"""
32
Functions that transform a given membership value to a truth value.
43
5-
How this can be useful? Beats me. Found it somewhere on the internet,
4+
How this can be useful? Beats me. Found it somewhere on the internet,
65
never needed it.
76
"""
7+
88
from math import sqrt
99

1010

1111
def true(m):
1212
"""The membership-value is its own truth-value."""
1313
return m
1414

15+
1516
def false(m):
1617
"""The opposite of TRUE."""
1718
return 1 - m
1819

20+
1921
def fairly_false(m):
2022
"""Part of a circle in quadrant I."""
21-
return sqrt(1 - m ** 2)
23+
return sqrt(1 - m**2)
24+
2225

2326
def fairly_true(m):
2427
"""Part of a circle in quadrant II."""
2528
return sqrt(1 - (1 - m) ** 2)
2629

30+
2731
def very_false(m):
2832
"""Part of a circle in quadrant III."""
2933
return -sqrt(1 - (1 - m) ** 2)
3034

35+
3136
def very_true(m):
3237
"""Part of a circle in quadrant IV."""
33-
return -sqrt(1 - m ** 2)
38+
return -sqrt(1 - m**2)

0 commit comments

Comments
 (0)