Skip to content

Commit

Permalink
feat: upgrade to ape 0.7 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Dec 19, 2023
1 parent 8ea395b commit 62b53b4
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
1 change: 0 additions & 1 deletion .mdformat.toml

This file was deleted.

6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml

Expand All @@ -10,7 +10,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.12.0
hooks:
- id: black
name: black
Expand All @@ -21,7 +21,7 @@ repos:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.7.1
hooks:
- id: mypy
additional_dependencies: [types-PyYAML, types-requests, types-setuptools, pydantic]
Expand Down
9 changes: 5 additions & 4 deletions ape_infura/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
"mainnet",
"mumbai",
],
"linea": [
"mainnet",
"goerli",
],
# TODO: Comment out after ape-linea supports 0.7
# "linea": [
# "mainnet",
# "goerli",
# ],
}


Expand Down
3 changes: 2 additions & 1 deletion ape_infura/provider.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import os
from typing import Dict, Optional, Tuple

from ape.api import UpstreamProvider, Web3Provider
from ape.api import UpstreamProvider
from ape.exceptions import ContractLogicError, ProviderError, VirtualMachineError
from ape_ethereum.provider import Web3Provider
from web3 import HTTPProvider, Web3
from web3.exceptions import ContractLogicError as Web3ContractLogicError
from web3.gas_strategies.rpc import rpc_gas_price_strategy
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ include = '\.pyi?$'

[tool.pytest.ini_options]
addopts = """
-n auto
-p no:ape_test
--cov-branch
--cov-report term
Expand All @@ -38,3 +37,6 @@ force_grid_wrap = 0
include_trailing_comma = true
multi_line_output = 3
use_parentheses = true

[tool.mdformat]
number = true
24 changes: 15 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,35 @@
extras_require = {
"test": [ # `test` GitHub Action jobs uses this
"pytest>=6.0", # Core testing package
"pytest-xdist", # multi-process runner
"pytest-xdist", # Multi-process runner
"pytest-cov", # Coverage analyzer plugin
"hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer
"ape-arbitrum",
"ape-optimism",
"ape-polygon",
"ape-linea",
# "ape-linea", # TODO: Comment out after supports 0.7
"websocket-client", # Used for web socket integration testing
],
"lint": [
"black>=23.9.1,<24", # auto-formatter and linter
"mypy>=1.5.1,<2", # Static type analyzer
"black>=23.12.0,<24", # Auto-formatter and linter
"mypy>=1.7.1,<2", # Static type analyzer
"types-setuptools", # Needed for mypy type shed
"flake8>=6.1.0,<7", # Style linter
"flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code
"flake8-print>=5.0.0,<6", # Detect print statements left in code
"isort>=5.10.1,<6", # Import sorting linter
"types-setuptools", # Needed due to mypy typeshed
"mdformat>=0.7.17", # Auto-formatter for markdown
"mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown
"mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates
"mdformat-pyproject>=0.0.1", # Allows configuring in pyproject.toml
],
"doc": [
"Sphinx>=3.4.3,<4", # Documentation generator
"sphinx_rtd_theme>=0.1.9,<1", # Readthedocs.org theme
"towncrier>=19.2.0, <20", # Generate release notes
"myst-parser>=1.0.0,<2", # Parse markdown docs
"sphinx-click>=4.4.0,<5", # For documenting CLI
"Sphinx>=6.1.3,<7", # Documentation generator
"sphinx_rtd_theme>=1.2.0,<2", # Readthedocs.org theme
"sphinxcontrib-napoleon>=0.7", # Allow Google-style documentation
"sphinx-plausible>=0.1.2,<0.2",
],
"release": [ # `release` GitHub Action job uses this
"setuptools", # Installation tool
Expand Down Expand Up @@ -69,7 +75,7 @@
url="https://github.com/ApeWorX/ape-infura",
include_package_data=True,
install_requires=[
"eth-ape>=0.6.19,<0.7",
"eth-ape>=0.7.0,<0.8",
],
python_requires=">=3.8,<4",
extras_require=extras_require,
Expand Down

0 comments on commit 62b53b4

Please sign in to comment.