ed-api-client 0.1.6__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ed-api-client
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: A client for interacting with the Ed LMS
5
5
  License: MIT
6
6
  Author: David Milne
@@ -16,19 +16,19 @@ class Selections(List[str]):
16
16
 
17
17
  stripped_s = s.strip()
18
18
 
19
- if self.is_subsumed(stripped_s):
19
+ if self.contains(stripped_s):
20
20
  return
21
21
 
22
22
  for candidate in list(self):
23
23
  if candidate in stripped_s:
24
24
  self.remove(candidate)
25
25
 
26
- self.add(stripped_s)
26
+ self.append(stripped_s)
27
27
 
28
28
  def contains(self, s: str) -> bool:
29
29
  stripped_s = s.strip()
30
- for candidate in self.strings:
31
- if stripped_s in candidate :
30
+ for candidate in self:
31
+ if stripped_s in candidate or stripped_s == candidate:
32
32
  return True
33
33
 
34
34
  return False
@@ -449,7 +449,7 @@ class FileSummary(File):
449
449
  typing_time: datetime.timedelta = datetime.timedelta(0)
450
450
  prev_typing_time: datetime.datetime = None
451
451
 
452
- selections: Selections = field(default_factory=list)
452
+ selections: Selections = field(default_factory=Selections)
453
453
  external_pastes: List[str] = field(default_factory=list)
454
454
 
455
455
  pasted_proportion: float = 0
@@ -715,7 +715,7 @@ class WorkspaceSummary:
715
715
  selected_content.add(sel_text.strip())
716
716
  sel_file = file_summaries.get(sel_file_id)
717
717
  if sel_file is not None:
718
- sel_file.selections.append(sel_text.strip())
718
+ sel_file.selections.add(sel_text.strip())
719
719
  if '\n' in sel_text:
720
720
  sel_file.multiline_selection_count += 1
721
721
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ed-api-client"
3
- version = "0.1.6"
3
+ version = "0.1.7"
4
4
  description = "A client for interacting with the Ed LMS"
5
5
  authors = ["David Milne <d.n.milne@gmail.com>"]
6
6
  license = "MIT"
File without changes