mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Enable ruff SIM102 rule (#11341)
* Enable ruff SIM102 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -64,10 +64,9 @@ class Clause:
|
||||
value = model[symbol]
|
||||
else:
|
||||
continue
|
||||
if value is not None:
|
||||
# Complement assignment if literal is in complemented form
|
||||
if literal.endswith("'"):
|
||||
value = not value
|
||||
# Complement assignment if literal is in complemented form
|
||||
if value is not None and literal.endswith("'"):
|
||||
value = not value
|
||||
self.literals[literal] = value
|
||||
|
||||
def evaluate(self, model: dict[str, bool | None]) -> bool | None:
|
||||
|
||||
Reference in New Issue
Block a user