Skip to content

Commit

Permalink
chore: update python version (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotPeopling2day authored Sep 13, 2022
1 parent 7f64b8f commit 83f2ffa
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ labels: 'bug'
---
### Environment information

* `ape` and plugin versions:
* Python Version: x.x.x
* OS: macOS/linux/win

If `ape` is installed:

* `ape` and plugin versions

```
$ ape --version
Expand All @@ -15,9 +20,6 @@ $ ape plugins list
# ...copy and paste result of above command here...
```

* Python Version: x.x.x
* OS: macOS/linux/win

### What went wrong?

Please include information like:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ on: ["push", "pull_request"]

name: Test


env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -57,7 +56,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # eventually add `windows-latest`
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ repos:


default_language_version:
python: python3.8
python: python3
6 changes: 4 additions & 2 deletions ethpm_types/contract_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def __init__(
self._selector_hash_fn = selector_hash_fn
super().__init__(iterable)

def __getitem__(self, item: Union[int, slice, str, bytes, MethodABI, EventABI]): # type: ignore
def __getitem__( # type: ignore
self, item: Union[int, slice, str, HexBytes, bytes, MethodABI, EventABI]
):
try:
# selector
if isinstance(item, str) and "(" in item:
Expand All @@ -230,7 +232,7 @@ def __getitem__(self, item: Union[int, slice, str, bytes, MethodABI, EventABI]):
return next(abi for abi in self if abi.name == item)
# hashed selector, like log.topics[0] or tx.data
# NOTE: Will fail with `ImportError` if `item` is `bytes` and `eth-hash` has no backend
elif isinstance(item, bytes) and self._selector_hash_fn:
elif isinstance(item, (bytes, HexBytes)) and self._selector_hash_fn:
return next(
abi
for abi in self
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ write_to = "ethpm_types/version.py"

[tool.black]
line-length = 100
target-version = ['py37', 'py38', 'py39', 'py310']
target-version = ['py38', 'py39', 'py310']
include = '\.pyi?$'

[tool.pytest.ini_options]
Expand Down
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@
url="https://github.com/ApeWorX/ethpm-types",
include_package_data=True,
install_requires=[
"importlib-metadata ; python_version<'3.8'",
"typing_extensions ; python_version<'3.8'",
"hexbytes>=0.2.3,<1",
"pydantic>=1.10.1,<2",
"eth-utils>=2.0.0,<3",
"py-cid>=0.3.0,<0.4",
"requests>=2.28.1,<3",
],
python_requires=">=3.7.2,<4",
python_requires=">=3.8,<3.11",
extras_require=extras_require,
py_modules=["ethpm_types"],
license="Apache-2.0",
Expand All @@ -92,7 +90,6 @@
"Operating System :: MacOS",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down

0 comments on commit 83f2ffa

Please sign in to comment.