Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some "type: ignore" comments after mypy upgrade #1803

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion common/global_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def on_post_window_command(self, window, command, args):
data = window.project_data()
if view and "GitSavvy" not in data.get("settings", {}):
sublime.set_timeout_async(
lambda: view.show_popup(PROJECT_MSG, max_width=550) # type: ignore
lambda: view.show_popup(PROJECT_MSG, max_width=550)
)
else:
w = sublime.active_window()
Expand Down
2 changes: 1 addition & 1 deletion core/commands/log_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2619,7 +2619,7 @@ def actions_for_single_line(self, view, info, branches):

def get_list(info, key):
# type: (LineInfo, ListItems) -> List[str]
return info.get(key, []) # type: ignore
return info.get(key, [])

if head_info and head_is_on_a_branch and cursor_is_not_on_head:
get = partial(get_list, info) # type: Callable[[ListItems], List[str]]
Expand Down
2 changes: 1 addition & 1 deletion core/fns.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
U = TypeVar('U')


filter_ = partial(filter, None) # type: Callable[[Iterable[Optional[T]]], Iterator[T]] # type: ignore[assignment]
filter_ = partial(filter, None) # type: Callable[[Iterable[Optional[T]]], Iterator[T]]
flatten = chain.from_iterable


Expand Down
2 changes: 1 addition & 1 deletion core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def erase_regions(view, region_key):
view.erase_regions(region_key)


IDS = partial(next, count()) # type: Callable[[], int] # type: ignore[assignment]
IDS = partial(next, count()) # type: Callable[[], int]
HIDE_POPUP_TIMERS = {} # type: Dict[sublime.ViewId, int]
POPUPS = {} # type: Dict[sublime.ViewId, Tuple]
DEFAULT_TIMEOUT = 2500 # [ms]
Expand Down