Skip to content

Commit 580b0c6

Browse files
committed
- r use callable()
This works around a mypy limitation. See python/mypy#14928 and python/mypy#3060
1 parent ef79f48 commit 580b0c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

approval_utilities/utilities/logger/logging_instance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
8888
self.log.log_line(expected)
8989

9090
def get_parameters(self, is_exit: bool):
91-
if isinstance(parameter_text, Callable):
91+
if callable(parameter_text):
9292
return parameter_text()
9393
elif parameter_text is None or is_exit:
9494
return ""

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ disable_error_code = return-value, assignment
8686
disable_error_code = assignment, import-untyped
8787

8888
[mypy-approval_utilities.utilities.logger.logging_instance]
89-
disable_error_code = valid-type, arg-type, no-any-return, assignment
89+
disable_error_code = valid-type, no-any-return, assignment
9090

9191
[mypy-approvaltests.utilities.command_line_approvals]
9292
disable_error_code = valid-type, arg-type

0 commit comments

Comments
 (0)