Skip to content

Add quote rule to the lint rules #8383

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

Merged
merged 1 commit into from
Jun 16, 2025
Merged

Conversation

TomeHirata
Copy link
Collaborator

Add flake8-quotes (Q) so that we don't manually fix quote preference.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the flake8-quotes (Q) rule to enforce a consistent use of double quotes across the codebase, and updates several files accordingly.

  • Updated test assertions in tests/predict/test_code_act.py to use double quotes.
  • Modified pyproject.toml to include the "Q" rule.
  • Adjusted string literals in multiple source files to be consistent with the lint rule.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/predict/test_code_act.py Changed dict key quotes from single to double quotes to comply with the new lint rule.
pyproject.toml Added the "Q" rule for flake8-quotes.
dspy/teleprompt/grpo.py Converted single quotes to double quotes in function parameters/assertions for consistency.
dspy/teleprompt/avatar_optimizer.py Updated string multiplication to use double quotes.
dspy/propose/utils.py Replaced single quotes with double quotes for regex patterns and string joins.
dspy/propose/grounded_proposer.py Changed single quotes to double quotes in string literals.
dspy/propose/dataset_summary_generator.py Updated key delimiter quotes for consistency.
dspy/primitives/python_interpreter.py Converted string literals to double quotes in command configuration.
dspy/adapters/utils.py Adjusted string join delimiter to double quotes.

Copy link
Collaborator

@chenmoneygithub chenmoneygithub left a comment

Choose a reason for hiding this comment

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

Thank you! XD

@TomeHirata TomeHirata merged commit 2787453 into stanfordnlp:main Jun 16, 2025
9 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