Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions stufen/checks/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ def matrices_almost_equal(actual, expected, eps=1e-6):

def a(a, b, c, d):

Copilot AI Dec 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name a shadows the function name a, which reduces code clarity. Additionally, using single-letter parameter names makes the code harder to understand. Consider renaming the parameters to be more descriptive, such as matrix, source_row_idx, target_row_idx, and scalar.

Copilot uses AI. Check for mistakes.
if not (0 <= b < len(a)) or not (0 <= c < len(a)) or d == 0:
return
return a
a[c] = [x + d * y for x, y in zip(a[c], a[b])]
return a
Comment on lines 22 to +26

Copilot AI Dec 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function lacks a docstring explaining its purpose, parameters, and return value. Consider adding documentation such as: what the function does (adds a multiple of one row to another), what the parameters represent (a: matrix, b: source row index, c: target row index, d: scalar multiplier), and what it returns (the modified matrix).

Copilot uses AI. Check for mistakes.
Comment on lines 22 to +26

Copilot AI Dec 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name a is extremely cryptic and unclear. Based on its usage (replacing module.rowAdd), this function performs row addition operations on a matrix. Consider renaming it to something more descriptive like row_add or _row_add (if intended to be private) to improve code readability and maintainability.

Copilot uses AI. Check for mistakes.


def m(a, b, c):

Copilot AI Dec 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single-letter parameter names reduce code clarity. Consider renaming the parameters to be more descriptive, such as matrix, row_idx, and scalar.

Copilot uses AI. Check for mistakes.
if not (0 <= b < len(a)) or c == 0:
return
return a
a[b] = [x * c if x != 0 else x for x in a[b]]
return a
Comment on lines 29 to +33

Copilot AI Dec 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name m is extremely cryptic and unclear. Based on its usage (replacing module.rowMult), this function performs row multiplication operations on a matrix. Consider renaming it to something more descriptive like row_mult or _row_mult (if intended to be private) to improve code readability and maintainability.

Copilot uses AI. Check for mistakes.
Comment on lines 29 to +33

Copilot AI Dec 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function lacks a docstring explaining its purpose, parameters, and return value. Consider adding documentation such as: what the function does (multiplies a row by a scalar), what the parameters represent (a: matrix, b: row index, c: scalar multiplier), and what it returns (the modified matrix).

Copilot uses AI. Check for mistakes.


@check50.check()
Expand Down