Skip to content

Conversation

@Ashutoshx7
Copy link
Contributor

Description

This PR removes the redundant remove_suffix helper function from helpers.py and replaces its single usage in _app.py with Python's built-in str.removesuffix() method (available since Python 3.9).

Since the project requires Python ≥3.10, this is safe to use and reduces code maintenance burden.

Related Tickets & Documents

N/A - Code cleanup/modernization

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Steps to QA

  1. Start the server with a custom base_url setting ending with /
  2. Verify static files are served correctly (the trailing slash is stripped as expected)
  3. Run existing tests to ensure no regressions

Added/updated tests?

  • Yes
  • No, and this is why: The native Python method str.removesuffix() is part of the standard library and is well-tested. The refactor is a 1:1 behavioral replacement verified through manual testing.
  • I need help with writing tests

Added/updated documentations?

  • Yes
  • No, and this is why: This is an internal refactor with no user-facing changes.
  • I need help with writing docs

Checklist

@Ashutoshx7 Ashutoshx7 requested a review from a team as a code owner January 26, 2026 07:52
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