Skip to content

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix Python syntax errors in v2 documentation examples

Summary

Fixes critical Python syntax errors in documentation examples that were using JavaScript object syntax instead of proper Python dictionary syntax. This affects all v2 Python code examples across the main documentation and all international language variants.

Key changes:

  • Replace unquoted dictionary keys with double-quoted strings (type: 'write'"type": "write")
  • Remove JavaScript-style semicolons from Python code blocks (});}))
  • Convert JavaScript boolean values to Python (trueTrue)

Files affected: 12 total files

  • Core snippet: snippets/v2/scrape/actions/python.mdx
  • Language variants: snippets/{zh,es,fr,ja,pt-BR}/v2/scrape/actions/python.mdx
  • Advanced guides: advanced-scraping-guide.mdx and all language variants

Review & Testing Checklist for Human

  • Verify documentation builds successfully - Critical since local testing failed due to pre-existing mintlify config issue
  • Validate Python syntax - Run corrected examples through Python parser to ensure they're executable
  • Check consistency across languages - Spot-check that Python code is identical across different language variants
  • Test examples with actual API - Verify the corrected examples still work with the live Firecrawl API

Notes

Testing limitation: Local documentation build testing was blocked by a pre-existing mintlify dev server configuration error (invalid theme in docs.json), so changes couldn't be validated against the build system locally.

Linear ticket: ENG-3648
Requested by: Micah Stairs (@micahstairs)
Link to Devin run: https://app.devin.ai/sessions/3a54b008e95e49c0ad2597a25f38c58d

- Replace unquoted dictionary keys with double-quoted strings
- Remove JavaScript-style semicolons from Python code blocks
- Convert JavaScript boolean values to Python (true -> True)
- Apply fixes to all v2 snippet files and advanced-scraping-guide.mdx across all language variants

Fixes affect:
- Core snippet: snippets/v2/scrape/actions/python.mdx
- Language variants: snippets/{zh,es,fr,ja,pt-BR}/v2/scrape/actions/python.mdx
- Advanced guides: advanced-scraping-guide.mdx and all language variants

Linear ticket: ENG-3648

Co-Authored-By: Micah Stairs <micah.stairs@gmail.com>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Add scripts/validate_python_syntax.py to validate Python code blocks in docs
- Update README with validation instructions for contributors
- Script checks all MDX/markdown files for syntactically valid Python examples
- Helps prevent future syntax errors in documentation

Linear ticket: ENG-3648

Co-Authored-By: Micah Stairs <micah.stairs@gmail.com>
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.

0 participants