Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify language in range documentation #30989

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

RaghavgitGrover
Copy link
Contributor

@RaghavgitGrover RaghavgitGrover commented Dec 7, 2024

Fixes #908 in supabase/supabase-py repo

  • Change parameter names from start/end to from/to for consistency
  • Fix incorrect offset description in notes section

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

docs update

What is the current behavior?

The python range documentation has the following issues:

  1. Inconsistent naming - The parameter list uses start and end while the description uses from and to
  2. Incorrect offset end description - The description states that the result is limited by "starting at an offset (from) and ending at the offset (from + to)". This is incorrect as the end index is just to. E.g. range(20, 30) returns 11 items (20-30), not 51 items (20-20+30)

What is the new behavior?

  1. Range indices are referenced as from and to in parameter list. This is aligned with the documentation for other languages.
  2. Description states that range offset ends at just to

Additional context

Add any other context or screenshots.
Screenshot 2024-12-07 172643

- Change parameter names from start/end to from/to for consistency
- Fix incorrect offset description in notes section
Copy link

vercel bot commented Dec 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 6:19pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
design-system ⬜️ Ignored (Inspect) Visit Preview Dec 9, 2024 6:19pm
studio ⬜️ Ignored (Inspect) Visit Preview Dec 9, 2024 6:19pm
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview Dec 9, 2024 6:19pm
studio-staging ⬜️ Ignored (Inspect) Visit Preview Dec 9, 2024 6:19pm
zone-www-dot-com ⬜️ Ignored (Inspect) Visit Preview Dec 9, 2024 6:19pm

@vercel vercel bot temporarily deployed to Preview – zone-www-dot-com December 7, 2024 12:51 Inactive
Copy link

vercel bot commented Dec 7, 2024

@RaghavgitGrover is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@charislam charislam left a comment

Choose a reason for hiding this comment

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

Thanks @RaghavgitGrover! Good catches!

Just a minor edit: Since the parameters are named start and end (see source), I've opted to keep those names, but made everything consistent by renaming from and to.

apps/docs/spec/supabase_py_v2.yml Outdated Show resolved Hide resolved
apps/docs/spec/supabase_py_v2.yml Outdated Show resolved Hide resolved
apps/docs/spec/supabase_py_v2.yml Outdated Show resolved Hide resolved
apps/docs/spec/supabase_py_v2.yml Outdated Show resolved Hide resolved
@charislam charislam enabled auto-merge (squash) December 9, 2024 18:15
@charislam charislam merged commit ecf62ed into supabase:master Dec 9, 2024
12 checks passed
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