From 070f51939360f89855a4b5c76c95a775bcadcd4c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:50:28 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pylint/checkers/typecheck.py | 4 +++- tests/test_self.py | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index f911fa4720..ac2d3f1e15 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -1453,11 +1453,13 @@ def visit_call(self, node: nodes.Call) -> None: """Check that called functions/methods are inferred to callable objects, and that passed arguments match the parameters in the inferred function. """ - def _dp(s, val = None): + + def _dp(s, val=None): if val is None: print(f" {s}", flush=True) else: print(f" {s}: {val}", flush=True) + _dp("-" * 25) _dp("visit call, node", node) diff --git a/tests/test_self.py b/tests/test_self.py index 5a273bb45e..c64d926f4e 100644 --- a/tests/test_self.py +++ b/tests/test_self.py @@ -343,7 +343,7 @@ def test_wrong_import_position_when_others_disabled(self) -> None: def test_super_init_with_non_self_argument(self) -> None: module1 = join(HERE, "regrtest_data", "super_init_with_non_self_argument.py") - args = [ module1 ] + args = [module1] out = StringIO() self._run_pylint(args, out=out) actual_output = self._clean_paths(out.getvalue().strip()) @@ -354,9 +354,11 @@ def test_super_init_with_non_self_argument(self) -> None: {module1}:11:0: blah """ ) - assert "Your code has been rated at 10.00/10" not in actual_output, "bad code should fail." + assert ( + "Your code has been rated at 10.00/10" not in actual_output + ), "bad code should fail." assert self._clean_paths(expected_output.strip()) == actual_output.strip() - + def test_progress_reporting(self) -> None: module1 = join(HERE, "regrtest_data", "import_something.py") module2 = join(HERE, "regrtest_data", "wrong_import_position.py")