prediction-market-agent-tooling 0.61.1.dev461__py3-none-any.whl → 0.61.1.dev463__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.
- prediction_market_agent_tooling/tools/_generic_value.py +9 -0
- {prediction_market_agent_tooling-0.61.1.dev461.dist-info → prediction_market_agent_tooling-0.61.1.dev463.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.61.1.dev461.dist-info → prediction_market_agent_tooling-0.61.1.dev463.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.61.1.dev461.dist-info → prediction_market_agent_tooling-0.61.1.dev463.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.61.1.dev461.dist-info → prediction_market_agent_tooling-0.61.1.dev463.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.61.1.dev461.dist-info → prediction_market_agent_tooling-0.61.1.dev463.dist-info}/entry_points.txt +0 -0
@@ -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.
|
@@ -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=
|
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.
|
124
|
-
prediction_market_agent_tooling-0.61.1.
|
125
|
-
prediction_market_agent_tooling-0.61.1.
|
126
|
-
prediction_market_agent_tooling-0.61.1.
|
127
|
-
prediction_market_agent_tooling-0.61.1.
|
123
|
+
prediction_market_agent_tooling-0.61.1.dev463.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
124
|
+
prediction_market_agent_tooling-0.61.1.dev463.dist-info/METADATA,sha256=Ffw49SoHlbcyEvVwF7G85L4_SWUDHMjWcm0CmThSaLM,8696
|
125
|
+
prediction_market_agent_tooling-0.61.1.dev463.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
126
|
+
prediction_market_agent_tooling-0.61.1.dev463.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
127
|
+
prediction_market_agent_tooling-0.61.1.dev463.dist-info/RECORD,,
|
File without changes
|
File without changes
|