Update quality tooling for formatting (#21480)
* Result of black 23.1 * Update target to Python 3.7 * Switch flake8 to ruff * Configure isort * Configure isort * Apply isort with line limit * Put the right black version * adapt black in check copies * Fix copies
This commit is contained in:
@@ -177,7 +177,7 @@ def blackify(code):
|
||||
has_indent = len(get_indent(code)) > 0
|
||||
if has_indent:
|
||||
code = f"class Bla:\n{code}"
|
||||
mode = black.Mode(target_versions={black.TargetVersion.PY35}, line_length=119, preview=True)
|
||||
mode = black.Mode(target_versions={black.TargetVersion.PY37}, line_length=119)
|
||||
result = black.format_str(code, mode=mode)
|
||||
result, _ = style_docstrings_in_code(result)
|
||||
return result[len("class Bla:\n") :] if has_indent else result
|
||||
|
||||
Reference in New Issue
Block a user