Enable ruff RUF001 rule (#11378)

* Enable ruff RUF001 rule

* Fix

* Fix
This commit is contained in:
Maxim Smolskiy
2024-04-22 22:45:24 +03:00
committed by GitHub
parent dbfa21813f
commit 79dc7c97ac
4 changed files with 7 additions and 8 deletions

View File

@ -57,7 +57,7 @@ class FuzzySet:
# Union Operations
>>> siya.union(sheru)
FuzzySet(name='Siya Sheru', left_boundary=0.4, peak=0.7, right_boundary=1.0)
FuzzySet(name='Siya U Sheru', left_boundary=0.4, peak=0.7, right_boundary=1.0)
"""
name: str
@ -147,10 +147,10 @@ class FuzzySet:
FuzzySet: A new fuzzy set representing the union.
>>> FuzzySet("a", 0.1, 0.2, 0.3).union(FuzzySet("b", 0.4, 0.5, 0.6))
FuzzySet(name='a b', left_boundary=0.1, peak=0.6, right_boundary=0.35)
FuzzySet(name='a U b', left_boundary=0.1, peak=0.6, right_boundary=0.35)
"""
return FuzzySet(
f"{self.name} {other.name}",
f"{self.name} U {other.name}",
min(self.left_boundary, other.left_boundary),
max(self.right_boundary, other.right_boundary),
(self.peak + other.peak) / 2,