-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add PEP701 support #3822
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
Add PEP701 support #3822
Changes from 3 commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
48ad67c
Add PEP701 support
tusharsadhwani 175942b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] fb2943b
Merge branch 'main' into fstrings-pep701
tusharsadhwani 9e344f4
Add FSTRING_START and FSTRING_MIDDLE tokenizing
tusharsadhwani dbdb02c
Support escaping of `{{`
tusharsadhwani 5acb397
typo
tusharsadhwani 20d7497
Merge branch 'main' into fstrings-pep701
tusharsadhwani 4a69ffa
fix some problems with triple quoted strings
tusharsadhwani ee30cde
Add support for FSTRING_MIDDLE and FSTRING_END
tusharsadhwani e7b5850
bugfix and simplify the regexes
tusharsadhwani 88af1c1
Fix small regex problems
tusharsadhwani c1ecc14
fix newline type
tusharsadhwani 644c5cc
turn endprog into endprog_stack
tusharsadhwani b23cdfd
Support fstrings with no braces
tusharsadhwani bbbac0a
Add grammar changes
tusharsadhwani dadaa64
fix some locations
tusharsadhwani a57e404
remove padding from fstring_middle and fstring_end
tusharsadhwani fff25fb
Fix some positions
tusharsadhwani 95cd0ba
fix edge cases with padding
tusharsadhwani caafa75
fix nested fstrings bug
tusharsadhwani 838f627
Fix bugs in multiline fstrings
tusharsadhwani f5abd4b
support fstring_middle ending with newline
tusharsadhwani fd3e5e1
fix edge case for triple quoted strings
tusharsadhwani 0c69069
Add string normalization
tusharsadhwani c4d457e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ace80e0
small bugfixes
tusharsadhwani c0a99c8
fix some bugs that I introduced just now
tusharsadhwani b02cf2a
strings and fstrings can have implicit concat
tusharsadhwani acd3c79
don't normalize docstring prefixes
tusharsadhwani 5bca062
Add !r format specifier support
tusharsadhwani b755281
Support non nested format specifiers
tusharsadhwani 8f7ecdf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 00dc7ac
fix walrus edge case
tusharsadhwani 306b9e9
empty FSTRING_MIDDLE should not be truncated
tusharsadhwani 7323840
support rf" tokens
tusharsadhwani 4fc656d
fix fstring feature detection
tusharsadhwani ea70516
fix edge cases in format specifier tokenizing
tusharsadhwani 4b80fe1
fix that one bug with depending on parenlev
tusharsadhwani 420867d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 160ef4e
fix line location for triple quoted strings
tusharsadhwani edf3d79
try to fix mypy errors
tusharsadhwani 23bee77
commit unstaged change
tusharsadhwani 6997d14
Add `fstring_format_spec` to symbols
tusharsadhwani 4e201fc
fix possible cause of mypyc crash
tusharsadhwani 3e39af1
Merge branch 'main' into fstrings-pep701
tusharsadhwani 17a9063
Fix edge case with wrapping format specs
tusharsadhwani c1f5e82
Merge branch 'main' into fstrings-pep701
tusharsadhwani d0af0c1
Add FSTRING_PARSING as a feature
tusharsadhwani 48348fa
Merge branch 'main' into fstrings-pep701
tusharsadhwani 78c1e9c
Add test case
tusharsadhwani 6931c92
Add two todos in test case
tusharsadhwani 53ca71c
tiny changes
tusharsadhwani 188583c
Merge branch 'main' into fstrings-pep701
tusharsadhwani 442228d
Merge branch 'main' into fstrings-pep701
hauntsaninja e97dd01
fix merge
hauntsaninja cf9b415
Update src/black/strings.py
hauntsaninja 2429e72
Merge branch 'main' into fstrings-pep701
tusharsadhwani 1318b32
Merge branch 'main' into fstrings-pep701
JelleZijlstra 9737159
changelog
JelleZijlstra e220c10
Lint, remove unused function
JelleZijlstra 7ef92db
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 62e0b2b
fix debug visitor test
tusharsadhwani df38ea0
fix most tests
tusharsadhwani 150a4fe
fix whitespace getting removed after fstring colon
tusharsadhwani c4487cb
remove unnecessary continue
tusharsadhwani 97640eb
Merge branch 'main' into fstrings-pep701
tusharsadhwani ece7452
don't use removeprefix
tusharsadhwani dfd3455
formatting
tusharsadhwani a81bae3
add minimum version
tusharsadhwani 0435144
fix the one failing test
tusharsadhwani 99f8eb7
fix couple more bugs
tusharsadhwani 3e56204
don't format fstrings at all
tusharsadhwani 9495f5e
address comments
tusharsadhwani 89a4d71
Merge branch 'main' into fstrings-pep701
tusharsadhwani cf76482
flake8
tusharsadhwani bbff3de
fix failing test
tusharsadhwani 0fef83c
undo default change
tusharsadhwani c570360
remove todo
tusharsadhwani 2a697c8
fix: \N{} case
tusharsadhwani a5f943b
make test a little better
tusharsadhwani 1ab815b
tweak regex to fix edge cases
tusharsadhwani 324cacb
Merge branch 'main' into fstrings-pep701
tusharsadhwani 019df7b
fix edge case with nested multiline strings
tusharsadhwani 40c9890
Merge branch 'main' into fstrings-pep701
tusharsadhwani a64939d
whitespace
tusharsadhwani 7df45fb
fix multiline formatspec todo
tusharsadhwani 36e04d2
add another test case
tusharsadhwani 25941cd
Merge branch 'main' into fstrings-pep701
tusharsadhwani eb05cd4
Revert "Remove node-specific logic from visit_default (#4321)"
tusharsadhwani 5d727ec
Revert "Revert "Remove node-specific logic from visit_default (#4321)""
JelleZijlstra ab2f43c
fix
JelleZijlstra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.