-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Q003 autofix for triple nested quotes is not valid python code #8739
Comments
@dragon-dxw the fixed version is in fact valid syntax in Python 3.12. If you set the target Python version to 3.11 or lower in your configuration using |
Yeah, in my testing this seems to be correctly detected based on the Python version. Do you mind testing if your Python version is set to Python 3.12? Happy to revisit if we're able to reproduce with a lower target-version. |
Version: 0.1.5
input:
msg = f"Document \"{context['document'].name}\" does not have a PDF."
error [no args, invoked by precommit]:
judgments/views/document_full_text.py:38:19: Q003 [*] Change outer quotes to avoid escaping inner quotes
autofix via
--fix
[via precommit]msg = f'Document "{context['document'].name}" does not have a PDF.'
which is not valid python
ruff config: https://github.com/nationalarchives/ds-caselaw-editor-ui/blob/chore/test-factory-improvements/pyproject.toml
The text was updated successfully, but these errors were encountered: