Skip to content

Commit be0b668

Browse files
Bump black from 24.8.0 to 25.1.0 (#1290)
* Bump black from 24.8.0 to 25.1.0 Bumps [black](https://github.com/psf/black) from 24.8.0 to 25.1.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@24.8.0...25.1.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Fix formatting and tests --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amethyst Reese <amethyst@n7.gg>
1 parent d3386b1 commit be0b668

7 files changed

Lines changed: 12 additions & 12 deletions

File tree

libcst/_parser/parso/tests/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class ParsoUtilsTest(UnitTest):
3939
# Invalid line breaks
4040
("a\vb", ["a\vb"], False),
4141
("a\vb", ["a\vb"], True),
42-
("\x1C", ["\x1C"], False),
43-
("\x1C", ["\x1C"], True),
42+
("\x1c", ["\x1c"], False),
43+
("\x1c", ["\x1c"], True),
4444
)
4545
)
4646
def test_split_lines(self, string, expected_result, keepends):

libcst/_parser/parso/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
_NON_LINE_BREAKS = (
3030
"\v", # Vertical Tabulation 0xB
3131
"\f", # Form Feed 0xC
32-
"\x1C", # File Separator
33-
"\x1D", # Group Separator
34-
"\x1E", # Record Separator
32+
"\x1c", # File Separator
33+
"\x1d", # Group Separator
34+
"\x1e", # Record Separator
3535
"\x85", # Next Line (NEL - Equivalent to CR+LF.
3636
# Used to mark end-of-line on some IBM mainframes.)
3737
"\u2028", # Line Separator

libcst/codemod/commands/rename.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
def leave_import_decorator(
18-
method: Callable[..., Union[cst.Import, cst.ImportFrom]]
18+
method: Callable[..., Union[cst.Import, cst.ImportFrom]],
1919
) -> Callable[..., Union[cst.Import, cst.ImportFrom]]:
2020
# We want to record any 'as name' that is relevant but only after we leave the corresponding Import/ImportFrom node since
2121
# we don't want the 'as name' to interfere with children 'Name' and 'Attribute' nodes.

libcst/codemod/tests/test_codemod_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_codemod_formatter_error_input(self) -> None:
4444
)
4545
else:
4646
self.assertIn(
47-
"error: cannot format -: Cannot parse: 13:10: async with AsyncExitStack() as stack:",
47+
"error: cannot format -: Cannot parse for target version Python 3.6: 13:10: async with AsyncExitStack() as stack:",
4848
rlt.stderr.decode("utf-8"),
4949
)
5050

libcst/matchers/_matcher_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ def __repr__(self) -> str:
800800

801801

802802
def ZeroOrMore(
803-
matcher: Union[_MatcherT, DoNotCareSentinel] = DoNotCareSentinel.DEFAULT
803+
matcher: Union[_MatcherT, DoNotCareSentinel] = DoNotCareSentinel.DEFAULT,
804804
) -> AtLeastN[Union[_MatcherT, DoNotCareSentinel]]:
805805
"""
806806
Used as a convenience wrapper to :class:`AtLeastN` when ``n`` is equal to ``0``.
@@ -903,7 +903,7 @@ def __repr__(self) -> str:
903903

904904

905905
def ZeroOrOne(
906-
matcher: Union[_MatcherT, DoNotCareSentinel] = DoNotCareSentinel.DEFAULT
906+
matcher: Union[_MatcherT, DoNotCareSentinel] = DoNotCareSentinel.DEFAULT,
907907
) -> AtMostN[Union[_MatcherT, DoNotCareSentinel]]:
908908
"""
909909
Used as a convenience wrapper to :class:`AtMostN` when ``n`` is equal to ``1``.
@@ -1017,7 +1017,7 @@ def _matches_zero_nodes(
10171017
MatchIfTrue[libcst.CSTNode],
10181018
_BaseMetadataMatcher,
10191019
DoNotCareSentinel,
1020-
]
1020+
],
10211021
) -> bool:
10221022
if isinstance(matcher, AtLeastN) and matcher.n == 0:
10231023
return True

libcst/metadata/scope_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ def _make_name_prefix(self) -> str:
778778
# Attribute(value=Name(value="a"), attr=Name(value="b")) -> ("a.b", "a")
779779
# each string has the corresponding CSTNode attached to it
780780
def _gen_dotted_names(
781-
node: Union[cst.Attribute, cst.Name]
781+
node: Union[cst.Attribute, cst.Name],
782782
) -> Iterator[Tuple[str, Union[cst.Attribute, cst.Name]]]:
783783
if isinstance(node, cst.Name):
784784
yield node.value, node

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dev = [
2727
"nbsphinx>=0.4.2",
2828
]
2929
dev-without-jupyter = [
30-
"black==24.8.0",
30+
"black==25.1.0",
3131
"coverage[toml]>=4.5.4",
3232
"build>=0.10.0",
3333
"fixit==2.1.0",

0 commit comments

Comments
 (0)