Skip to content

fix: CR-12345 fixes#55

Open
yuvalyacoby wants to merge 2 commits into
mainfrom
testing-123
Open

fix: CR-12345 fixes#55
yuvalyacoby wants to merge 2 commits into
mainfrom
testing-123

Conversation

@yuvalyacoby
Copy link
Copy Markdown
Contributor

@yuvalyacoby yuvalyacoby commented May 24, 2026

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Update the client fetchData handler to target the corrected API endpoint and to keep related global state strings aligned with expectations. Correct the utility math script to keep its arithmetic and user I/O logic consistent and free of formatting errors.

TopicDetails
Data fetch flow Update the fetchData routine to target the corrected API endpoint and revise global state strings to keep runtime expectations aligned.
Modified files (1)
  • node/index.js
Latest Contributors(1)
UserCommitDate
yacoby133@gmail.comfixesMay 24, 2026
Math utility fix Correct the utility script arithmetic and I/O formatting to prevent syntax issues and keep user prompts clear.
Modified files (1)
  • python/edits.py
Latest Contributors(2)
UserCommitDate
yacoby133@gmail.comblaMay 24, 2026
yuvalyacobyRevert "Revert "Revert...December 24, 2025
Review this PR on Baz | Customize your next review

@yuvalyacoby
Copy link
Copy Markdown
Contributor Author

baz review

@baz-reviewer baz-reviewer Bot added the baz approved Baz-reviewer has approved this PR label May 24, 2026
@baz-reviewer baz-reviewer Bot removed the baz approved Baz-reviewer has approved this PR label May 24, 2026
Comment thread python/edits.py
# calculate the discriminant
d = (b2 ** 2) - (4 * a * c)

d = (b2 ** 2) -
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

d = (b2 ** 2) - is truncated and leaves a dangling -, so python/edits.py can't be parsed or imported and nothing after sol1/sol2 runs — should we fix the expression?

Finding type: Logical Bugs | Severity: 🔴 High


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents
Before applying, verify this suggestion against the current code. In `python/edits.py`
around lines 17-17 where the script computes the discriminant (`d = (b2 ** 2) -`), fix
the syntax error by completing the truncated subtraction term. Restore the full
discriminant calculation used by the quadratic formula (the missing `-(4 * a * c)` part)
so the file can be imported and the subsequent `sol1` computation works. After updating
the line, quickly re-check that the variables referenced in `sol1`/`sol2` (`a`, `b2`,
`c`, and `d`) are defined consistently above in the same scope.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

apply commit

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To apply a code change, reply to Baz with apply commit to push the fix to this PR's branch, or apply pr to open a follow-up PR with the fix.

Comment thread python/edits.py
Comment on lines +25 to 28
kilometers = float(input("Enter value in kilometers: ok bla bla bla"))

# conversion factor
conv_fac = 0.621371
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This kilometer-to-mile conversion logic is duplicated across three scripts, should we extract a shared helper or single utility instead of copy/pasting it?

Finding type: Code Dedup and Conventions | Severity: 🟢 Low


Want Baz to fix this for you? Activate Fixer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

apply commit

Comment thread python/edits.py
Comment on lines 31 to +32
miles = kilometers * conv_fac
print('%0.2f kilometers is equal to %0.2f miles' % (kilometers, miles))
print('%0.2f kilometers 0.2f miles' % (kilometers, miles))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The format string is missing the second %, causing a TypeError at runtime — should we fix it to '%0.2f kilometers %0.2f miles' % (kilometers, miles)?

Finding types: Naming and Typos Logical Bugs | Severity: 🔴 High


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents
In python/edits.py around lines 31-32, the print statement uses `'%0.2f kilometers 0.2f
miles' % (kilometers, miles)` — only one `%0.2f` placeholder for two values, raising a
TypeError at runtime. Update the format string to `'%0.2f kilometers %0.2f miles'` so
both `kilometers` and `miles` are formatted correctly, consistent with the pattern used
in python/additions.py and python/dir/deletions.py. Verify the output text is coherent
and no TypeError occurs on execution.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

apply commit

Comment thread python/edits.py
Comment on lines 34 to 37
# Program to add two matrices using nested loop

X = [[12, 7, 3],
[4, 5, 6],
[7, 8, 9]]

Y = [[5, 8, 1],
[6, 7, 3],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The matrix-addition example is duplicated in python/additions.py and python/dir/deletions.py, should we extract a shared helper or centralized sample?

Finding type: Code Dedup and Conventions | Severity: 🟢 Low


Want Baz to fix this for you? Activate Fixer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

apply commit

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To apply a code change, reply to Baz with apply commit to push the fix to this PR's branch, or apply pr to open a follow-up PR with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant