nsarchive 1.0.0__tar.gz → 1.1.0__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.1
2
2
  Name: nsarchive
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: happex
@@ -170,6 +170,7 @@ class EntityInstance:
170
170
 
171
171
  id = NSID(id)
172
172
  groups = self.fetch_entities({'_type': 'organization'}, {'members': id})
173
+ groups.extend(self.fetch_entities({'_type': 'organization', 'owner_id': id}))
173
174
 
174
175
  return groups
175
176
 
@@ -13,18 +13,15 @@ class NSID(str):
13
13
  interior_department = "103"
14
14
 
15
15
  def __new__(cls, value):
16
- instance = super(NSID, cls).__new__(cls, value)
17
- return instance
18
-
19
- def __init__(self, value: str | int = ""):
20
16
  if type(value) == int:
21
17
  value = hex(value)
22
18
  elif type(value) in (str, NSID):
23
19
  value = hex(int(value, 16))
24
20
  else:
25
21
  return TypeError(f"<{value}> is not NSID serializable")
26
-
22
+
27
23
  if value.startswith("0x"):
28
24
  value = value[2:]
29
-
30
- self.value = value.upper()
25
+
26
+ instance = super(NSID, cls).__new__(cls, value.upper())
27
+ return instance
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "nsarchive"
3
- version = "1.0.0"
3
+ version = "1.1.0"
4
4
  description = ""
5
5
  authors = ["happex <110610727+okayhappex@users.noreply.github.com>"]
6
6
  license = "GPL-3.0"
File without changes
File without changes