chore(Linter): reformatted code with black (#211)

* chore(Linter): reformatted code with black

* Create black.yaml
This commit is contained in:
Mark Aron Szulyovszky
2022-02-17 19:22:17 +01:00
committed by GitHub
parent f3fee4a4e1
commit 8dd2d88740
101 changed files with 2596 additions and 2320 deletions
+27 -26
View File
@@ -3,27 +3,28 @@ from .utils import *
class ETH2:
"""
ETH 2.0 class.
ETH 2.0 class.
Methods
-------
__init__(glassnode_client):
Constructs an ETH2 object.
new_deposits():
Returns the number transactions depositing 32 ETH to the ETH2 deposit contract.
new_value_staked():
Returns the amount of ETH transferred to the ETH2 deposit contract.
new_validators():
Returns the number of new validators depositing 32 ETH to the ETH2 deposit contract.
total_number_of_deposits():
Returns the total number of transactions to the ETH2 deposit contract.
total_value_staked():
Returns the amount of ETH deposited to the ETH2 deposit contract.
total_number_of_validators():
Returns the total number of unique validators.
phase_zero_staking_goal():
Returns the percentage of the Phase 0 staking goal.
Methods
-------
__init__(glassnode_client):
Constructs an ETH2 object.
new_deposits():
Returns the number transactions depositing 32 ETH to the ETH2 deposit contract.
new_value_staked():
Returns the amount of ETH transferred to the ETH2 deposit contract.
new_validators():
Returns the number of new validators depositing 32 ETH to the ETH2 deposit contract.
total_number_of_deposits():
Returns the total number of transactions to the ETH2 deposit contract.
total_value_staked():
Returns the amount of ETH deposited to the ETH2 deposit contract.
total_number_of_validators():
Returns the total number of unique validators.
phase_zero_staking_goal():
Returns the percentage of the Phase 0 staking goal.
"""
def __init__(self, glassnode_client):
self._gc = glassnode_client
@@ -35,7 +36,7 @@ class ETH2:
:return: A DataFrame with ETH2 deposit data.
:rtype: DataFrame
"""
endpoint = '/v1/metrics/eth2/staking_deposits_count'
endpoint = "/v1/metrics/eth2/staking_deposits_count"
if not is_supported_by_endpoint(self._gc, endpoint):
return pd.DataFrame()
@@ -49,7 +50,7 @@ class ETH2:
:return: A DataFrame with staked value data.
:rtype: DataFrame
"""
endpoint = '/v1/metrics/eth2/staking_volume_sum'
endpoint = "/v1/metrics/eth2/staking_volume_sum"
if not is_supported_by_endpoint(self._gc, endpoint):
return pd.DataFrame()
@@ -63,7 +64,7 @@ class ETH2:
:return: A DataFrame with new validators data.
:rtype: DataFrame
"""
endpoint = '/v1/metrics/eth2/staking_validators_count'
endpoint = "/v1/metrics/eth2/staking_validators_count"
if not is_supported_by_endpoint(self._gc, endpoint):
return pd.DataFrame()
@@ -77,7 +78,7 @@ class ETH2:
:return: A DataFrame with ETH2 deposit data.
:rtype: DataFrame
"""
endpoint = '/v1/metrics/eth2/staking_total_deposits_count'
endpoint = "/v1/metrics/eth2/staking_total_deposits_count"
if not is_supported_by_endpoint(self._gc, endpoint):
return pd.DataFrame()
@@ -92,7 +93,7 @@ class ETH2:
:return: A DataFrame with ETH2 deposit data.
:rtype: DataFrame
"""
endpoint = '/v1/metrics/eth2/staking_total_volume_sum'
endpoint = "/v1/metrics/eth2/staking_total_volume_sum"
if not is_supported_by_endpoint(self._gc, endpoint):
return pd.DataFrame()
@@ -106,7 +107,7 @@ class ETH2:
:return: A DataFrame with ETH2 deposit data.
:rtype: DataFrame
"""
endpoint = '/v1/metrics/eth2/staking_total_validators_count'
endpoint = "/v1/metrics/eth2/staking_total_validators_count"
if not is_supported_by_endpoint(self._gc, endpoint):
return pd.DataFrame()
@@ -120,7 +121,7 @@ class ETH2:
:return: A DataFrame with staking goal data.
:rtype: DataFrame
"""
endpoint = '/v1/metrics/eth2/staking_phase_0_goal_percent'
endpoint = "/v1/metrics/eth2/staking_phase_0_goal_percent"
if not is_supported_by_endpoint(self._gc, endpoint):
return pd.DataFrame()