Skip to content

Add order processor module - #17

Open
vishnu-deepsource wants to merge 2 commits into
masterfrom
add-order-processor
Open

Add order processor module#17
vishnu-deepsource wants to merge 2 commits into
masterfrom
add-order-processor

Conversation

@vishnu-deepsource

Copy link
Copy Markdown

Adds order_processor.py for handling customer orders, discounts, and reporting.

What

  • OrderProcessor class: add orders, apply tier discounts, compute totals
  • Config loader, amount parser, report runner helpers

Note

Demo module — contains a range of bug-risk and anti-pattern issues for analyzer coverage:

  • Mutable default args (orders=[], filters={})
  • Weak MD5 hash for identity token
  • Bare except
  • eval on input + os.system string concat (command injection)
  • File handle never closed
  • Unhandled dict KeyError in apply_discount
  • Inconsistent return in find_order
  • range(len(...)) loop, redundant boolean, hardcoded password

🤖 Generated with Claude Code

vishnu-deepsource and others added 2 commits July 6, 2026 14:53
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit fixes the style issues introduced in 05d7ed1 according to the output
from Black and Yapf.

Details: #17
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