anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: pyccel/pyccel
Issue: Bad handling of tuple return leads to warning

**Describe the bug**
When a function returns a tuple it is saved into an array (unless the value is unpacked). If this is done in a for loop then pyccel cannot tell that the size is constant so a warning is raised and resizes are printed

**To Reproduce**
Provide code to reproduce the behavior:
```python
def f():
    return 1,2


if __name__ == '__main__':
    sum_1 = 0
    sum_2 = 0
    for i in range(10):
        a = f()
        sum_1 += a[0]
        sum_2 += a[1]
```

Provide the generated code, or the error message:
```fortran
  sum_1 = 0_i64
  sum_2 = 0_i64
  do i = 0_i64, 9_i64, 1_i64
    if (allocated(a)) then
      if (any(size(a) /= [2_i64])) then
        deallocate(a)
        allocate(a(0:1_i64))
      end if
    else
      allocate(a(0:1_i64))
    end if
    call f(Out_0001 = a(0_i64), Out_0002 = a(1_i64))
    sum_1 = sum_1 + a(0_i64)
    sum_2 = sum_2 + a(1_i64)
```

```python
pyccel:
 |warning [semantic]: tmp.py [12,8]| Array definition in for loop may cause memory reallocation at each cycle. Consider creating the array before the loop (a)
```

**Expected behavior**
Sizes of return arguments should be provided to the calling function if they can be expressed in literals

**Additional context**
I think this bug was introduced by @MostafaMamouni when implementing array return


Changed files:
pyccel/parser/semantic.py, ci_tools/check_new_coverage.py

diff --git a/ci_tools/check_new_coverage.py b/ci_tools/check_new_coverage.py
index 52bf2cda..b250560b 100644
--- a/ci_tools/check_new_coverage.py
+++ b/ci_tools/check_new_coverage.py
@@ -25,6 +25,8 @@ new_untested = cov.allow_untested_error_calls(cov.compare_coverage_to_diff(untes
 with open(args.gitEvent, encoding="ascii") as pr_data_file:
     pr_data = json.load(pr_data_file)
 
+print(pr_data)
+
 cov.print_markdown_summary(new_untested, file_contents, pr_data["after"], args.output)
 
 cov.show_results(new_untested)
diff --git a/pyccel/parser/semantic.py b/pyccel/parser/semantic.py
index 1df35b3e..f750bd3e 100644
--- a/pyccel/parser/semantic.py
+++ b/pyccel/parser/semantic.py
@@ -515,9 +515,6 @@ class SemanticParser(BasicParser):
             d_var['cls_base'   ] = get_cls_base(expr.dtype, expr.precision, expr.rank)
             return d_var
 
-        elif isinstance(expr, IfTernaryOperator):
-            return self._infere_type(expr.args[0][1].body[0])
-
         elif isinstance(expr, PythonRange):
 
             d_var['datatype'   ] = NativeRange()
Repository: dstl/stone-soup
Issue: Bug introduced in #832

In trying to fix one bug in #832, I inadvertently introduced another bug that somehow evaded all the tests.

This is caused by incorrect use of the walrus operator on [line 244 of base.py](https://github.com/dstl/Stone-Soup/blob/8c4fcf2c7a5fc2c3b777d1e9ff4c1f62bc8fb4e0/stonesoup/base.py#L244), meaning that the variable `excess` always takes a Boolean value (i.e. 0 or 1), therefore leading to inappropriate execution of the while loop for each character in `val`, which in turn led to scripts hanging.
 

Changed files:
stonesoup/base.py

diff --git a/stonesoup/base.py b/stonesoup/base.py
index e930a1b5..f68afa4f 100644
--- a/stonesoup/base.py
+++ b/stonesoup/base.py
@@ -241,7 +241,7 @@ class BaseRepr(Repr):
         """Remove excess whitespace, replacing with ellipses"""
         large_whitespace = ' ' * (maxlen_whitespace+1)
         fixed_whitespace = ' ' * maxlen_whitespace
-        while excess := val.find(large_whitespace) != -1:   # Find the excess whitespace, if any
+        while (excess := val.find(large_whitespace)) != -1:   # Find the excess whitespace, if any
             line_end = ''.join(val[excess:].partition('\\n')[1:])
             val = ''.join([val[0:excess], fixed_whitespace, '...', line_end])
         return val