Skip to content

Commit e79a3c9

Browse files
authored
Format with Black v2024.1 (#843)
Black v2024.1 introduced some formatting changes that are somewhat noisy in portions of the compiler. This is just a separate PR to run it separate of other functional changes.
1 parent 36994ba commit e79a3c9

File tree

6 files changed

+197
-161
lines changed

6 files changed

+197
-161
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ astor = { version = "^0.8.1", python = "<3.9", optional = true }
4343
pytest = { version = "^7.0.0", optional = true }
4444
pygments = { version = "^2.9.0", optional = true }
4545

46-
[tool.poetry.dev-dependencies]
47-
black = "*"
46+
[tool.poetry.group.dev.dependencies]
47+
black = ">=24.0.0"
4848
docutils = "*"
4949
isort = "*"
5050
pygments = "*"

src/basilisp/cli.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,11 @@ def run(
490490
)
491491
basilisp.init(opts)
492492
ctx = compiler.CompilerContext(
493-
filename=CLI_INPUT_FILE_PATH
494-
if args.code
495-
else (STDIN_INPUT_FILE_PATH if target == STDIN_FILE_NAME else target),
493+
filename=(
494+
CLI_INPUT_FILE_PATH
495+
if args.code
496+
else (STDIN_INPUT_FILE_PATH if target == STDIN_FILE_NAME else target)
497+
),
496498
opts=opts,
497499
)
498500
eof = object()

src/basilisp/lang/compiler/analyzer.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,9 +1823,11 @@ def _deftype_ast( # pylint: disable=too-many-locals
18231823
is_assignable=is_mutable,
18241824
env=ctx.get_node_env(),
18251825
tag=_tag_ast(_tag_meta(field), ctx),
1826-
init=analyze_form(ctx, field_default)
1827-
if field_default is not __DEFTYPE_DEFAULT_SENTINEL
1828-
else None,
1826+
init=(
1827+
analyze_form(ctx, field_default)
1828+
if field_default is not __DEFTYPE_DEFAULT_SENTINEL
1829+
else None
1830+
),
18291831
)
18301832
param_nodes.append(binding)
18311833
ctx.put_new_symbol(field, binding, warn_if_unused=False)
@@ -3051,9 +3053,11 @@ def _try_ast(form: ISeq, ctx: AnalyzerContext) -> Try:
30513053
),
30523054
catches=vec.vector(catches),
30533055
finally_=finally_,
3054-
children=vec.v(BODY, CATCHES, FINALLY)
3055-
if finally_ is not None
3056-
else vec.v(BODY, CATCHES),
3056+
children=(
3057+
vec.v(BODY, CATCHES, FINALLY)
3058+
if finally_ is not None
3059+
else vec.v(BODY, CATCHES)
3060+
),
30573061
env=ctx.get_node_env(pos=ctx.syntax_position),
30583062
)
30593063

0 commit comments

Comments
 (0)