yapf
yapf copied to clipboard
A formatter for Python files
Hi. Using Python3.10 match case raise exception. Version: yapf-0.31.0 ```python def http_error(status): match status: case _: return "" ``` ``` Traceback (most recent call last): File "tmp/.venv/lib/python3.10/site-packages/yapf/yapflib/pytree_utils.py", line 115, in...
Input: ```python for row_2, key in enumerate( ['parcel_area', 'building_area_low', 'building_area_high']): update(row_2 + 2, key) ``` Output: ```python for row_2, key in enumerate( ['parcel_area', 'building_area_low', 'building_area_high']): update(row_2 + 2, key) ```...
There are small typos in: - yapf/yapflib/format_decision_state.py - yapf/yapflib/logical_line.py - yapftests/file_resources_test.py Fixes: - Should read `overzealous` rather than `overzelous`. - Should read `indent` rather than `indend`. - Should read `formatting`...
When formatting a dict with a very long value, such as a list. The following case is expected. ```python { 1: 1, 2: 2, 3: 3, 4: [1, 2, 3,...
Input: ```python foo(argument=1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 +...
How I can from this: ```py async def get_user( credentials: HTTPAuthorizationCredentials = Security(security) ): token = credentials.credentials with Session(engine) as session: user = session.exec(select(User).where(User.token == token) ).one_or_none() . . ....
I believe this is a bug, but would appreciate being corrected if it is not. Using `yapf` version 0.32.0, with the following options (see below for full `pyproject.toml`: ``` column_limit...
I'm switching my project from space indentation to tabs using yapf `USE_TABS = True`. Some of the existing code deals with overlong lines using backslashes ``` bar = {'baz': {'qux':...
The knob documentations says `indent_dictionary_value:True` will "indent the dictionary value _if it cannot fit on the same line as the dictionary key"_. However I see cases where this option creates...