Repository navigation
Commit 8dcdb7e
docs: Fix invalid Python in the README context examples (#75)
**Requirements**
- [ ] I have added test coverage for new or changed functionality
- [x] I have followed the repository's [pull request submission
guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
- [x] I have validated my changes against all supported platform
versions
**Related issues**
None. Found during the weekly OpenFeature provider audit.
**Describe the solution you've provided**
The `EvaluationContext` examples in "OpenFeature Specific
Considerations" did not run as Python: they used `null`/`true`, `,` in
place of `:` in dict entries, a `[ ... "anonymous" = > true ]` list for
the user context, and a trailing `;`. The "private attributes in a
multi-context" example also set `"kind": "organization"` rather than
`"multi"`, so it described a single context with nested attributes
instead of the multi-context the heading names.
Each example now executes, and each one converts through
`EvaluationContextConverter` to a valid LaunchDarkly context of the
intended shape (checked against `openfeature-sdk` 0.10.0 and
`launchdarkly-server-sdk` 9.20.0).
**Describe alternatives you've considered**
None.
**Additional context**
Docs only; no code changes.
Link to Devin session:
https://app.devin.ai/sessions/f7bc946afe8c41a28cf7f3f497fc8b9d
Open in Devin Desktop:
https://app.devin.ai/desktop/session/f7bc946afe8c41a28cf7f3f497fc8b9d?variant=devin
[SDK-3496](https://launchdarkly.atlassian.net/browse/SDK-3496)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Overview**
> **README-only fix** for the OpenFeature `EvaluationContext` examples
under “OpenFeature Specific Considerations.”
>
> The snippets now use valid Python: dict entries use `:` instead of
`,`, `None`/`True` replace `null`/`true`, trailing semicolons are
removed, and nested `user`/`organization` blocks are dicts rather than
malformed lists or `"anonymous" = > true` syntax. The **private
attributes in a multi-context** example now sets `"kind": "multi"` (was
`"organization"`) so it matches the section title and the intended
multi-context shape.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d6e47f3. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[SDK-3496]:
https://launchdarkly.atlassian.net/browse/SDK-3496?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 3a48713 commit 8dcdb7e
1 file changed
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
| 129 | + | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
0 commit comments