Updated ruff to the latest version (#31926)

* Updated ruff version and fixed the required code accorindg to the latest version.

* Updated ruff version and fixed the required code accorindg to the latest version.

* Added noqa directive to ignore 1 error shown by ruff
This commit is contained in:
Sai-Suraj-27
2024-07-23 20:37:31 +05:30
committed by GitHub
parent 9cf4f2aa9a
commit d2c687b3f1
14 changed files with 17 additions and 17 deletions

View File

@@ -214,7 +214,7 @@ recur_fibo(6)"""
def test_access_attributes(self):
code = "integer = 1\nobj_class = integer.__class__\nobj_class"
result = evaluate_python_code(code, {}, state={})
assert result == int
assert result is int
def test_list_comprehension(self):
code = "sentence = 'THESEAGULL43'\nmeaningful_sentence = '-'.join([char.lower() for char in sentence if char.isalpha()])"
@@ -591,7 +591,7 @@ except ValueError as e:
code = "type_a = float(2); type_b = str; type_c = int"
state = {}
result = evaluate_python_code(code, {"float": float, "str": str, "int": int}, state=state)
assert result == int
assert result is int
def test_tuple_id(self):
code = """