8000 chore: Make `condition_index` optional. Also added some scripts for local dev. by haacked · Pull Request #223 · PostHog/posthog-python · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: Make condition_index optional. Also added some scripts for local dev. #223

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 8000 terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 18, 2025

Conversation

haacked
Copy link
Collaborator
@haacked haacked commented Apr 18, 2025

See PostHog/posthog#30569 for why I'm making this change to condition_index.

See PostHog/meta#309 for the rationale behind these scripts.

@haacked haacked requested a review from dmarticus April 18, 2025 18:11
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

This PR adds development scripts and makes condition_index optional in feature flag responses for the PostHog Python client.

  • Modified FlagReason class in posthog/types.py to make condition_index an Optional[int] instead of requiring an integer value
  • Added bin/setup script to create virtualenv and install dev/test dependencies
  • Added bin/fmt script for code formatting using black and isort
  • Added bin/build script for running flake8 and mypy checks
  • Added bin/test script for running pytest with helper utilities from bin/helpers/_utils.sh

7 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

source bin/helpers/_utils.sh
set_source_and_root_dir

flake8 posthog --ignore E501,W503
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding --config=setup.cfg to ensure flake8 uses consistent configuration across different environments

haacked and others added 4 commits April 18, 2025 11:57
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Copy link
Member
@rafaeelaudibert rafaeelaudibert left a comment

Choose a reason for hiding this comment

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

low-context stamp

@haacked haacked merged commit a6fb399 into master Apr 18, 2025
1 of 6 checks passed
@haacked haacked deleted the haacked/nullable-condition-index branch April 18, 2025 18:59
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
0