mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
Add optimized best_fit_parenthesize
IR (#7475)
This commit is contained in:
parent
28b48ab902
commit
6a4dbd622b
11 changed files with 413 additions and 96 deletions
|
@ -70,3 +70,32 @@ def test():
|
|||
if True:
|
||||
VLM_m2m = VLM.m2m_also_quite_long_zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.through
|
||||
allows_group_by_select_index = self.connection.features.allows_group_by_select_index
|
||||
|
||||
|
||||
# This is a deviation from Black:
|
||||
# Black keeps the comment inside of the parentheses, making it more likely to exceed the line width.
|
||||
# Ruff renders the comment after the parentheses, giving it more space to fit.
|
||||
if True:
|
||||
if True:
|
||||
if True:
|
||||
# Black layout
|
||||
model.config.use_cache = (
|
||||
False # FSTM still requires this hack -> FSTM should probably be refactored s
|
||||
)
|
||||
# Ruff layout
|
||||
model.config.use_cache = False # FSTM still requires this hack -> FSTM should probably be refactored s
|
||||
|
||||
|
||||
# Regression test for https://github.com/astral-sh/ruff/issues/7463
|
||||
mp3fmt="<span style=\"color: grey\"><a href=\"{}\" id=\"audiolink\">listen</a></span></br>\n"
|
||||
|
||||
# Regression test for https://github.com/astral-sh/ruff/issues/7067
|
||||
def f():
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = (
|
||||
True
|
||||
)
|
||||
|
||||
# Regression test for https://github.com/astral-sh/ruff/issues/7462
|
||||
if grid is not None:
|
||||
rgrid = (rgrid.rio.reproject_match(grid, nodata=fillvalue) # rio.reproject nodata is use to initlialize the destination array
|
||||
.where(~grid.isnull()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue