Skip to content

Conversation

@yuvalyacoby
Copy link
Contributor

@yuvalyacoby yuvalyacoby commented Dec 25, 2025

User description

Reverts #52


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Updates the edits.py script to include an additional solution variable and refines the project documentation and session configuration. Re-introduces session metadata and minor formatting changes across the codebase.

TopicDetails
Config and Docs Adds a new session identifier in .fixer/session.json and appends commit metadata to the NestJS README.md.
Modified files (2)
  • .fixer/session.json
  • typescript/nestjs/README.md
Latest Contributors(1)
UserCommitDate
anton.gruebel@gmail.comadd-nestjs-exampleDecember 05, 2024
Python Logic Update Modifies the quadratic equation solver in edits.py by adding sol23 and adjusting the whitespace in the calculation of sol1 and sol2.
Modified files (1)
  • python/edits.py
Latest Contributors(2)
UserCommitDate
yuvalyacobyRevert-Revert-Revert-t...December 24, 2025
nimrod@baz.coUpdated-python-code-1July 08, 2024
This pull request is reviewed by Baz. Review like a pro on (Baz).

Comment on lines 17 to 23
d = (b2 ** 2) - (4 * a * c)

# find two solutions
sol1 = (-b2 - cmath.sqrt(d)) / (2 * a)
sol2 = (-b2 + cmath.sqrt(d)) / (2 * a)
sol1 = (-b-cmath.sqrt(d))/(2*a)
sol2 = (-b+cmath.sqrt(d))/(2*a)
sol23 = (-b+cmath.sqrt(d))/(2*a)

Copy link

Choose a reason for hiding this comment

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

The roots use -b/+b, but only b2 is defined—this will raise a NameError. Should both the discriminant and roots use b2 consistently?

Suggested change
d = (b2 ** 2) - (4 * a * c)
# find two solutions
sol1 = (-b2 - cmath.sqrt(d)) / (2 * a)
sol2 = (-b2 + cmath.sqrt(d)) / (2 * a)
sol1 = (-b-cmath.sqrt(d))/(2*a)
sol2 = (-b+cmath.sqrt(d))/(2*a)
sol23 = (-b+cmath.sqrt(d))/(2*a)
d = (b2 ** 2) - (4 * a * c)
# find two solutions
sol1 = (-b2-cmath.sqrt(d))/(2*a)
sol2 = (-b2+cmath.sqrt(d))/(2*a)

Finding types: Logical Bugs Basic Security Patterns

Copy link

Choose a reason for hiding this comment

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

Commit b696d76 addressed this comment. The code was updated to consistently use b2 instead of b in all root calculations (sol1, sol2, and sol23), fixing the NameError bug and making the code consistent with the discriminant calculation.

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.

2 participants