configure isort to add the future annotations import (#13327)

* configure isort to add the future annotations import

* apply the new isort setting

* remove type ignores for new mypy (#13539)

https://pypi.org/project/mypy/0.981/

* another
This commit is contained in:
Kyle Altendorf 2022-09-30 04:40:22 -04:00 committed by GitHub
parent 333e836f44
commit 3b084a165b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
386 changed files with 776 additions and 0 deletions

View File

@ -2,6 +2,7 @@
line_length = 120
profile=black
skip_gitignore=true
add_imports=from __future__ import annotations
# venv/bin/isort --check . |& sed -n "s;ERROR: ${PWD}/\(.*\) Imports are.*; \1;p" | sort | uniq
extend_skip=
chia/clvm/spend_sim.py

View File

@ -1,5 +1,7 @@
#!/usr/bin/env python3
from __future__ import annotations
import os
import pathlib
import subprocess

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import os
import random

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import os
import random

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import os
import random

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import random
from time import perf_counter

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import cProfile
from contextlib import contextmanager

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import json
import sys
from dataclasses import dataclass

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import os
import random
import subprocess

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import os
import pathlib
import platform

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from setuptools_scm import get_version

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from pkg_resources import DistributionNotFound, get_distribution, resource_filename
try:

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from chia.wallet.puzzles.load_clvm import load_clvm_maybe_recompile
P2_SINGLETON_MOD = load_clvm_maybe_recompile("p2_singleton.clvm")

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import zipfile
from datetime import datetime
from pathlib import Path

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import os
import sys
from pathlib import Path

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from contextlib import asynccontextmanager
from pathlib import Path
from typing import Any, AsyncIterator, Awaitable, Callable, Dict, Optional, Tuple, Type

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from typing import Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import json
import logging
from pathlib import Path

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from decimal import Decimal
from pathlib import Path
from types import TracebackType

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from typing import Any, Dict, Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from typing import Any, Dict, Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Optional
from chia.cmds.cmds_util import get_any_service_client

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Optional
import click

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from typing import Any, Dict, Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import logging
import sys

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import json
import sys

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from typing import Any, Dict, List, Optional, Union

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import sys
from pathlib import Path

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Dict
# The rest of the codebase uses mojos everywhere.

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import collections
import logging
from typing import Awaitable, Callable, Dict, List, Optional, Set, Tuple, Union

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
import random
from dataclasses import replace

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import dataclasses
import logging
import time

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from chia.util.ints import uint32, uint64
# 1 Chia coin = 1,000,000,000,000 = 1 trillion mojo.

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Dict, List, Optional, Tuple
from chia_rs import compute_merkle_set_root

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import dataclasses
import logging

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Dict, List, Optional
from chia.consensus.block_record import BlockRecord

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from blspy import G1Element
from chia.types.blockchain_format.coin import Coin

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from enum import Enum

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import dataclasses
import logging
from typing import Any

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from chia.util.ints import uint64
from .constants import ConsensusConstants

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Optional
from chia.consensus.block_record import BlockRecord

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import List, Optional, Tuple
from chia.consensus.block_record import BlockRecord

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Union
from chia.consensus.block_record import BlockRecord

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import List, Optional, Union
from chia.consensus.block_record import BlockRecord

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
from typing import List, Union

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
from typing import Optional, Union

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import logging
import traceback

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from chia.util.ints import uint64
# The actual space in bytes of a plot, is _expected_plot_size(k) * UI_ACTUAL_SPACE_CONSTANT_FACTO

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from chia.consensus.constants import ConsensusConstants
from chia.consensus.pos_quality import _expected_plot_size
from chia.types.blockchain_format.sized_bytes import bytes32

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import List, Optional, Tuple
from chia.consensus.block_record import BlockRecord

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import json
import ssl

View File

@ -3,6 +3,8 @@ Code taken from Stack Overflow Eryk Sun.
https://stackoverflow.com/questions/35772001/how-to-handle-the-signal-in-python-on-windows-machine
"""
from __future__ import annotations
import os
import signal
import sys

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import logging
import random

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
from chia.data_layer.data_layer import DataLayer

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Iterable, List
from chia.types.blockchain_format.sized_bytes import bytes32

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import functools
import logging

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
from collections import defaultdict
from contextlib import asynccontextmanager

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import dataclasses
from typing import List, Optional, Type, TypeVar, Union

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import logging
import os

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import os
import sys

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import json
import logging

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import json
import time
from typing import Any, Dict, List, Optional, Tuple

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Dict, List, Optional, Set, Tuple
from chia.consensus.blockchain import StateChangeSummary

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Dict, List, Optional
from sortedcontainers import SortedDict

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Dict
from chia.types.blockchain_format.sized_bytes import bytes32

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import concurrent
import dataclasses

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import time
from pathlib import Path

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Callable, Optional
from chia.introducer.introducer import Introducer

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Dict, List, Union

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any
from chia.plot_sync.util import ErrorCodes, State

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
import time
from dataclasses import dataclass, field

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from enum import IntEnum
from typing import TypeVar

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import asyncio
import contextlib
import json

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
import time
import traceback

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
from collections import Counter
from pathlib import Path

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
from datetime import datetime
from pathlib import Path

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
import threading
import time

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
from dataclasses import dataclass, field
from enum import Enum

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import logging
from dataclasses import dataclass
from pathlib import Path

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional, Tuple

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import List

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from enum import Enum

View File

@ -1,4 +1,6 @@
# These settings should not be end-user configurable
from __future__ import annotations
INVALID_PROTOCOL_BAN_SECONDS = 10
API_EXCEPTION_BAN_SECONDS = 10
INTERNAL_PROTOCOL_ERROR_BAN_SECONDS = 10 # Don't flap if our client is at fault

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from enum import IntEnum
from typing import List, Tuple

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional, Tuple

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional, Tuple

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import ipaddress
from typing import Any, Dict, List, Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from typing import Any, Dict, List, Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any, Dict, Type, TypeVar
from typing_extensions import Protocol

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import dataclasses
import operator
from typing import Any, Callable, Dict, List, Optional

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any, Dict, List, Optional
from chia.rpc.farmer_rpc_api import PlotInfoRequestData, PlotPathRequestData

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any, Dict, List, Optional
from clvm.casts import int_from_bytes

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any, Dict, List
from chia.harvester.harvester import Harvester

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any, Dict, List
from chia.rpc.rpc_client import RpcClient

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any, Dict, List, Optional
from chia.rpc.rpc_server import Endpoint

Some files were not shown because too many files have changed in this diff Show More