prediction-market-agent-tooling 0.61.1.dev462__py3-none-any.whl → 0.62.0.dev464__py3-none-any.whl

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.
@@ -29,10 +29,19 @@ class _GenericValue(
29
29
  d = Mana(100) # Mana is a subclass of _GenericValue
30
30
  e = xDai(50)
31
31
 
32
+ # Mypy will complain if we try to work with different currencies (types)
32
33
  b - c # mypy will report incompatible types
33
34
  c - d # mypy will report incompatible types
34
35
  c - e # mypy will be ok
35
36
  a - b # mypy won't report issues, as others are subclasses of _GenericValue, and that's a problem, so don't use _GenericValue directly
37
+
38
+ # Resulting types after arithmetic operations are as expected, so we don't need to wrap them as before (e.g. xdai_type(c + c))
39
+ x = c - e # x is of type xDai
40
+ x = c * e # x if of type xDai
41
+ x = c / e # x is of type float (pure value after division with same types)
42
+ x = c / 2 # x is of type xDai
43
+ x = c // 2 # x is of type xDai
44
+ x * x * 2 # x is of type xDai
36
45
  ```
37
46
 
38
47
  TODO: There are some type ignores which isn't cool, but it works and type-wise values are also correct. Idk how to explain it to mypy though.
@@ -95,14 +104,12 @@ class _GenericValue(
95
104
  return type(self)(self.value * (other if isinstance(other, (int, float)) else other.value)) # type: ignore
96
105
 
97
106
  @overload
98
- def __truediv__(self: GenericValueType, other: int | float) -> GenericValueType:
99
- ...
107
+ def __truediv__(self: GenericValueType, other: int | float) -> GenericValueType: ...
100
108
 
101
109
  @overload
102
110
  def __truediv__(
103
111
  self: GenericValueType, other: GenericValueType
104
- ) -> InternalValueType:
105
- ...
112
+ ) -> InternalValueType: ...
106
113
 
107
114
  def __truediv__(
108
115
  self: GenericValueType, other: GenericValueType | int | float
@@ -119,14 +126,14 @@ class _GenericValue(
119
126
  return self.value / other.value # type: ignore
120
127
 
121
128
  @overload
122
- def __floordiv__(self: GenericValueType, other: int | float) -> GenericValueType:
123
- ...
129
+ def __floordiv__(
130
+ self: GenericValueType, other: int | float
131
+ ) -> GenericValueType: ...
124
132
 
125
133
  @overload
126
134
  def __floordiv__(
127
135
  self: GenericValueType, other: GenericValueType
128
- ) -> InternalValueType:
129
- ...
136
+ ) -> InternalValueType: ...
130
137
 
131
138
  def __floordiv__(
132
139
  self: GenericValueType, other: GenericValueType | int | float
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.61.1.dev462
3
+ Version: 0.62.0.dev464
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -74,7 +74,7 @@ prediction_market_agent_tooling/monitor/monitor.py,sha256=yvSXwV-3DSAm3vsFZnFC9j
74
74
  prediction_market_agent_tooling/monitor/monitor_app.py,sha256=-_6w_ZvQ-Ad5qaeuo7NKTXUOOZ_6OrR8jMe25BGOY4k,4615
75
75
  prediction_market_agent_tooling/monitor/monitor_settings.py,sha256=Xiozs3AsufuJ04JOe1vjUri-IAMWHjjmc2ugGGiHNH4,947
76
76
  prediction_market_agent_tooling/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
- prediction_market_agent_tooling/tools/_generic_value.py,sha256=7mRbslShqtQYKlYtFHTWB68cXmDAgy8TW8vTBlbvQXg,9969
77
+ prediction_market_agent_tooling/tools/_generic_value.py,sha256=uMUf6IRC19PHxE8b78PRfECt5kuzZwS4W6DNs4OfDjk,10410
78
78
  prediction_market_agent_tooling/tools/balances.py,sha256=9MpTTnquwjflTYYo1e0w48iOTceBuQV_6PfvywrTlFk,989
79
79
  prediction_market_agent_tooling/tools/betting_strategies/kelly_criterion.py,sha256=cui0wc7InSG-GdFvrJ3ypxAvHBTnv7UAFR6QOm6pI8A,4813
80
80
  prediction_market_agent_tooling/tools/betting_strategies/market_moving.py,sha256=uG11UAzM6C0ZKTS7SyT1iVsTs6O13y8_o8RAtm29HFg,5432
@@ -120,8 +120,8 @@ prediction_market_agent_tooling/tools/tokens/usd.py,sha256=0GU7RiWGlu7yDctGeWJeL
120
120
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
121
121
  prediction_market_agent_tooling/tools/utils.py,sha256=7P1veh76ni-0EfT7MlRlLE9hHUU498UOx70Lwxe7UaM,6536
122
122
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=eYCc1iWAVtqDKUPTwnMUHuYolPdwh_OTiM3-AdRgDp4,12198
123
- prediction_market_agent_tooling-0.61.1.dev462.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
124
- prediction_market_agent_tooling-0.61.1.dev462.dist-info/METADATA,sha256=HMaLAX2VekKozaAuhfEwhxF4Ieh_UDfRgJ4LDu_lisM,8696
125
- prediction_market_agent_tooling-0.61.1.dev462.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
126
- prediction_market_agent_tooling-0.61.1.dev462.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
127
- prediction_market_agent_tooling-0.61.1.dev462.dist-info/RECORD,,
123
+ prediction_market_agent_tooling-0.62.0.dev464.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
124
+ prediction_market_agent_tooling-0.62.0.dev464.dist-info/METADATA,sha256=vpRbCXlVUcGU2D4AoWgE_nbcMJf-mUq3yClm9CWMhxk,8696
125
+ prediction_market_agent_tooling-0.62.0.dev464.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
126
+ prediction_market_agent_tooling-0.62.0.dev464.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
127
+ prediction_market_agent_tooling-0.62.0.dev464.dist-info/RECORD,,