kopia lustrzana https://github.com/bugout-dev/moonstream
Fix lint.
rodzic
ece1159837
commit
10e0a410d7
|
@ -15,7 +15,7 @@ from sqlalchemy.exc import IntegrityError
|
|||
from sqlalchemy.orm import Query, Session
|
||||
from tqdm import tqdm
|
||||
from web3 import HTTPProvider, IPCProvider, Web3
|
||||
from web3.middleware import geth_poa_middleware
|
||||
from web3.middleware import geth_poa_middleware # type: ignore
|
||||
from web3.types import BlockData
|
||||
|
||||
from .data import DateRange
|
||||
|
|
|
@ -14,7 +14,7 @@ from moonstreamdbv3.db import (
|
|||
from moonstreamtypes.blockchain import AvailableBlockchainType
|
||||
from moonstreamtypes.subscriptions import blockchain_type_to_subscription_type
|
||||
from web3 import Web3
|
||||
from web3.middleware import geth_poa_middleware
|
||||
from web3.middleware import geth_poa_middleware # type: ignore
|
||||
|
||||
from ..db import yield_db_session_ctx
|
||||
from ..settings import (
|
||||
|
@ -435,9 +435,9 @@ def handle_historical_crawl(args: argparse.Namespace) -> None:
|
|||
if args.find_deployed_blocks:
|
||||
addresses_set = set()
|
||||
for job in filtered_event_jobs:
|
||||
addresses_set.update(job.contracts)
|
||||
addresses_set.update(job.contracts) # type: ignore
|
||||
for function_job in filtered_function_call_jobs:
|
||||
addresses_set.add(function_job.contract_address)
|
||||
addresses_set.add(function_job.contract_address) # type: ignore
|
||||
|
||||
if args.start is None:
|
||||
start_block = web3.eth.blockNumber - 1
|
||||
|
@ -488,8 +488,8 @@ def handle_historical_crawl(args: argparse.Namespace) -> None:
|
|||
db_session,
|
||||
blockchain_type,
|
||||
web3,
|
||||
filtered_event_jobs,
|
||||
filtered_function_call_jobs,
|
||||
filtered_event_jobs, # type: ignore
|
||||
filtered_function_call_jobs, # type: ignore
|
||||
start_block,
|
||||
end_block,
|
||||
args.max_blocks_batch,
|
||||
|
|
|
@ -22,7 +22,7 @@ def _event_to_label(
|
|||
event: Event,
|
||||
label_name=CRAWLER_LABEL,
|
||||
db_version: int = 2,
|
||||
) -> Base:
|
||||
) -> Base: # type: ignore
|
||||
"""
|
||||
Creates a label model.
|
||||
"""
|
||||
|
@ -72,7 +72,7 @@ def _function_call_to_label(
|
|||
function_call: ContractFunctionCall,
|
||||
db_version: int = 2,
|
||||
label_name=CRAWLER_LABEL,
|
||||
) -> Base:
|
||||
) -> Base: # type: ignore
|
||||
"""
|
||||
Creates a label model.
|
||||
"""
|
||||
|
|
|
@ -8,10 +8,10 @@ from moonstreamtypes.blockchain import (
|
|||
get_label_model,
|
||||
get_block_model,
|
||||
)
|
||||
from moonworm.crawler.log_scanner import (
|
||||
_crawl_events as moonworm_autoscale_crawl_events, # type: ignore
|
||||
from moonworm.crawler.log_scanner import ( # type: ignore
|
||||
_crawl_events as moonworm_autoscale_crawl_events,
|
||||
)
|
||||
from moonworm.crawler.log_scanner import _fetch_events_chunk
|
||||
from moonworm.crawler.log_scanner import _fetch_events_chunk # type: ignore
|
||||
from sqlalchemy.orm.session import Session
|
||||
from sqlalchemy.sql.expression import and_
|
||||
from web3 import Web3
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import logging
|
||||
from typing import List, Union
|
||||
|
||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||
from moonstreamtypes.blockchain import AvailableBlockchainType
|
||||
from moonstreamdb.networks import blockchain_type_to_network_type # type: ignore
|
||||
from moonworm.crawler.function_call_crawler import ( # type: ignore
|
||||
|
@ -11,7 +10,7 @@ from moonworm.crawler.function_call_crawler import ( # type: ignore
|
|||
from moonworm.crawler.moonstream_ethereum_state_provider import ( # type: ignore
|
||||
MoonstreamEthereumStateProvider,
|
||||
)
|
||||
from moonworm.crawler.ethereum_state_provider import Web3StateProvider
|
||||
from moonworm.crawler.ethereum_state_provider import Web3StateProvider # type: ignore
|
||||
from moonworm.watch import MockState # type: ignore
|
||||
from sqlalchemy.orm import Session
|
||||
from web3 import Web3
|
||||
|
|
|
@ -11,7 +11,7 @@ from moonworm.crawler.moonstream_ethereum_state_provider import ( # type: ignor
|
|||
MoonstreamEthereumStateProvider,
|
||||
Network,
|
||||
)
|
||||
from moonworm.crawler.ethereum_state_provider import Web3StateProvider
|
||||
from moonworm.crawler.ethereum_state_provider import Web3StateProvider # type: ignore
|
||||
from sqlalchemy.orm.session import Session
|
||||
from web3 import Web3
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ from typing import Dict, Optional
|
|||
from uuid import UUID
|
||||
|
||||
from bugout.app import Bugout
|
||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||
from moonstreamtypes.blockchain import AvailableBlockchainType
|
||||
|
||||
# Bugout
|
||||
BUGOUT_BROOD_URL = os.environ.get("BUGOUT_BROOD_URL", "https://auth.bugout.dev")
|
||||
|
|
|
@ -11,8 +11,7 @@ from typing import Any, Dict, List, Optional
|
|||
from uuid import UUID
|
||||
|
||||
from moonstream.client import Moonstream # type: ignore
|
||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||
from web3.middleware import geth_poa_middleware
|
||||
from moonstreamtypes.blockchain import AvailableBlockchainType
|
||||
|
||||
from mooncrawl.moonworm_crawler.crawler import _retry_connect_web3
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import json
|
|||
import logging
|
||||
from typing import Any, Dict
|
||||
|
||||
from moonstreamdb.blockchain import AvailableBlockchainType, get_label_model
|
||||
from moonstreamtypes.blockchain import AvailableBlockchainType, get_label_model
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from ..settings import VIEW_STATE_CRAWLER_LABEL
|
||||
|
|
Ładowanie…
Reference in New Issue