Skip to content

Commit

Permalink
Merge scope types in cheatsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Dec 10, 2021
1 parent cee86cc commit 25ac141
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/cheat_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,12 @@ def draw(self, canvas):
self.draw_items(canvas, actions_2)
self.next_column(canvas)

all_scopes = get_list("scope_type", {"argumentOrParameter": "Argument"})
scopes_limit = len(all_scopes) - 3
all_scopes = {
**get_list("scope_type", {"argumentOrParameter": "Argument"}),
**get_list("selection_type"),
**get_list("subtoken_scope_type"),
}
scopes_limit = 24
scopes_1 = slice_dict(all_scopes, 0, scopes_limit)
scopes_2 = slice_dict(all_scopes, scopes_limit)

Expand All @@ -164,14 +168,6 @@ def draw(self, canvas):
self.draw_header(canvas, "More scopes")
self.draw_items(canvas, scopes_2)

self.next_row()
self.draw_header(canvas, "Selection types")
self.draw_items(canvas, get_list("selection_type"))

self.next_row()
self.draw_header(canvas, "Subtokens")
self.draw_items(canvas, get_list("subtoken_scope_type"))

self.next_row()
self.draw_header(canvas, "Positions")
self.draw_items(canvas, get_list("position"))
Expand Down

0 comments on commit 25ac141

Please sign in to comment.