Yilei
Yilei
### Description This PR resolves #3159. It adds parentheses around implicit string concatenations when it's inside a list, set, or function call. ### Implementation notes Looking at the order of...
**Describe the style change** When splitting long string literals in _Black_'s `--preview` _Improved string processing_ style, add parentheses around implicit string concatenations to increase readability in certain contexts. "certain contexts"...
**Describe the bug** Black's --preview mode produces invalid code in the first pass, causing second pass to fail. **To Reproduce** For example, take this code: ```python some_dict = { "something_something":...
Calling performSelector for a @objc_method created by rubicon from Objective C crashes in Python 3.9
**Describe the bug** In Python 3.9, calling `[obj performSelector:NSSelectorFromString(@"name")]` crashes with `EXC_BAD_ACCESS (code=2, address=0x1056f7f48)` if the obj is an instance of a class created by `rubicon` with `@objc_method def name(self):...
### Steps to reproduce See following code: ```python import astroid node = astroid.extract_node( """ import typing typing.Tuple[int] #@ """) for inferred in node.infer(): print('inferred:', inferred) print('has __class_getitem__', '__class_getitem__' in inferred)...
**Describe the style change** Original code: ```python function_call( ( " lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor" " incididunt ut labore et dolore magna aliqua...
### Bug description Given the following code: ```python # pylint: disable=missing-docstring,too-few-public-methods import abc import six class MyClass(six.with_metaclass(abc.ABCMeta)): pass ``` ### Configuration _No response_ ### Command used ```shell pylint a.py ```...
**To Reproduce** Unformatted code: ```python def main(): if a: # Comment def b(): pass if b: def c(): pass ``` Running `black --preview`: ```python def main(): if a: # Comment...