Skip to content

Comments

perfer to always use splat and optional catchcall#1436

Merged
adhami3310 merged 1 commit intomainfrom
perfer-to-always-use-splat-and-optional-catchcall
Jun 17, 2025
Merged

perfer to always use splat and optional catchcall#1436
adhami3310 merged 1 commit intomainfrom
perfer-to-always-use-splat-and-optional-catchcall

Conversation

@adhami3310
Copy link
Member

No description provided.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Updates routing patterns and dependencies to standardize catch-all routes using splat parameter and modernize project requirements.

  • Modified /docs/library/chakra/[...component] to /docs/library/chakra/[[...splat]] in pcweb/pcweb.py for consistency
  • Updated dynamic routing docs in docs/pages/dynamic_routing.md to enforce splat as the standard catch-all parameter name
  • Added requirements.txt with major upgrades: pandas 2.3.0 (Python 3.10+), OpenAI 1.78.1 (Python 3.8+), and new visualization packages
  • Switched from psycopg2-binary to psycopg3 for improved PostgreSQL support

3 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile

args = self.router.page.params
usernames = args.get('username', [])
usernames = args.get('splat', [])
return f"Posts by \{', '.join(usernames)}"
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The string interpolation uses a backslash before the curly brace which will cause a syntax error

Suggested change
return f"Posts by \{', '.join(usernames)}"
return f"Posts by {', '.join(usernames)}"

Comment on lines +104 to +107
| `/products/[category]/[[...splat]]` | `/products/electronics` | valid |
| | `/products/electronics/laptops` | valid |
| | `/products/electronics/laptops/lenovo` | valid |
| | `/products/electronics/laptops/lenovo/thinkpad` | valid |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: This is a duplicate entry from lines 102-103, showing the same route pattern with the same behavior

Suggested change
| `/products/[category]/[[...splat]]` | `/products/electronics` | valid |
| | `/products/electronics/laptops` | valid |
| | `/products/electronics/laptops/lenovo` | valid |
| | `/products/electronics/laptops/lenovo/thinkpad` | valid |
| `/products/[category]/[[...splat]]` | `/products/electronics/laptops` | valid |
| | `/products/electronics/laptops/lenovo` | valid |

@adhami3310 adhami3310 merged commit 10ba809 into main Jun 17, 2025
9 checks passed
@adhami3310 adhami3310 deleted the perfer-to-always-use-splat-and-optional-catchcall branch June 17, 2025 20:08
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