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 Jan 17, 2025
1 parent 32e950e commit 070f519
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 5 additions & 3 deletions tests/test_self.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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")
Expand Down

0 comments on commit 070f519

Please sign in to comment.