Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 23, 2024
1 parent 56c15b1 commit f58951f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/test_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import pytest

from astroid import (
Assign,
Const,
Slice,
Uninferable,
Expand All @@ -27,7 +28,7 @@
nodes,
objects,
test_utils,
util, Assign,
util,
)
from astroid import decorators as decoratorsmod
from astroid.arguments import CallSite
Expand Down Expand Up @@ -7393,17 +7394,20 @@ def test_empty_format_spec() -> None:
@pytest.mark.parametrize(
"source, expected",
[
("""
(
"""
class Cls:
# pylint: disable=too-few-public-methods
pass
c_obj = Cls()
s1 = f'{c_obj!r}' #@
""", '<__main__.Cls'),
("s1 = f'{5}' #@", "5")
]
""",
"<__main__.Cls",
),
("s1 = f'{5}' #@", "5"),
],
)
def test_joined_str_returns_string(source, expected) -> None:
"""Regression test for https://github.com/pylint-dev/pylint/issues/9947."""
Expand All @@ -7415,4 +7419,3 @@ def test_joined_str_returns_string(source, expected) -> None:
assert len(inferred) == 1
assert isinstance(inferred[0], Const)
inferred[0].value.startswith(expected)

0 comments on commit f58951f

Please sign in to comment.