Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions mypy/semanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6520,12 +6520,28 @@ def fail(
return
# In case it's a bug and we don't really have context
assert ctx is not None, msg
self.errors.report(ctx.line, ctx.column, msg, blocker=blocker, code=code)
self.errors.report(
ctx.line,
ctx.column,
msg,
blocker=blocker,
end_line=ctx.end_line,
end_column=ctx.end_column,
code=code,
)

def note(self, msg: str, ctx: Context, code: ErrorCode | None = None) -> None:
if not self.in_checked_function():
return
self.errors.report(ctx.line, ctx.column, msg, severity="note", code=code)
self.errors.report(
ctx.line,
ctx.column,
msg,
severity="note",
end_line=ctx.end_line,
end_column=ctx.end_column,
code=code,
)

def incomplete_feature_enabled(self, feature: str, ctx: Context) -> bool:
if feature not in self.options.enable_incomplete_feature:
Expand Down