Yilei Yang
46be1f8e54
Support formatting specified lines ( #4020 )
2023-11-06 18:05:25 -08:00
Shantanu
ecbd9e8cf7
Fix crash with f-string docstrings ( #4019 )
...
Python does not consider f-strings to be docstrings, so we probably
shouldn't be formatting them as such
Fixes #4018
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-06 16:58:43 -08:00
Yilei Yang
e808e61db8
Preview: Keep requiring two empty lines between module-level docstring and first function or class definition ( #4028 )
...
Fixes #4027 .
2023-11-06 14:30:04 -08:00
Jelle Zijlstra
c54c213d6a
Fix crash on await (a ** b) ( #3994 )
2023-11-02 20:42:11 -07:00
Jelle Zijlstra
5758da6e3c
Fix bytes strings being treated as docstrings ( #4003 )
...
Fixes #4002
2023-10-31 17:11:28 -07:00
Henri Holopainen
e50110353a
Produce equivalent code for docstrings containing backslash followed by whitespace(s) before newline ( #4008 )
...
Fixes #3727
2023-10-31 08:27:11 -07:00
Henri Holopainen
ddfecf06c1
Hug parens also with multiline unpacking ( #3992 )
2023-10-30 08:35:26 -07:00
Jelle Zijlstra
5edd99312a
Regression test for match variable inside match ( #3993 )
2023-10-28 11:05:53 -07:00
Shantanu
c712d57ca9
Add trailing comma test case for hugging parens ( #3991 )
2023-10-27 12:17:54 -07:00
Henri Holopainen
878937bcc3
[2213] Add support for single line format skip with other comments on the same line ( #3959 )
2023-10-25 09:47:21 -07:00
Henri Holopainen
1d4c31aa58
[925] Improve multiline dictionary and list indentation for sole function parameter ( #3964 )
2023-10-25 08:35:37 -07:00
Henri Holopainen
2db5ab0a7b
Allow empty line after block open before a comment or compound statement ( #3967 )
2023-10-23 07:38:36 -07:00
Henri Holopainen
882d8795c6
Fix merging implicit multiline strings that have inline comments ( #3956 )
...
* Fix test behaviour
* Add new test cases
* Skip merging strings that have inline comments
* Don't merge lines with multiline strings with inline comments
* Changelog entry
* Document implicit multiline string merging rules
* Fix PR number
2023-10-19 20:09:33 -07:00
Jelle Zijlstra
bb588073ab
Fix parser bug where "type" was misinterpreted as a keyword inside a match ( #3950 )
...
Fixes #3790
Slightly hacky, but I think this is correct and it should also improve performance somewhat.
2023-10-17 00:59:15 -07:00
Jelle Zijlstra
722735d20e
Fix grammar for type alias support ( #3949 )
...
Fixes #3948
2023-10-16 10:53:38 -07:00
Henri Holopainen
1648ac5180
Fix long lines with power operator(s) getting splitted before line length ( #3942 )
...
Fixes #3889
2023-10-16 07:08:21 -07:00
Jelle Zijlstra
935f303a0a
Fix test that was not being run ( #3939 )
2023-10-09 20:02:27 -07:00
Daniël van Noord
b7717c3f1e
Standardise newlines after module-level docstrings ( #3932 )
...
Co-authored-by: jpy-git <josephyoung.jpy@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-10-09 19:34:26 -07:00
Jelle Zijlstra
a69bda3b9b
Use inline flags for test cases ( #3931 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-10-09 18:43:47 -07:00