Skip to content

Commit

Permalink
Merge 2230fd4 into 4ebc3e5
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Jun 7, 2024
2 parents 4ebc3e5 + 2230fd4 commit 3338939
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 92 deletions.
1 change: 1 addition & 0 deletions gnosis/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION = "6.0.0b30"
2 changes: 1 addition & 1 deletion gnosis/eth/contracts/contract_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(
address: ChecksumAddress,
ethereum_client: "EthereumClient", # noqa F821
*args,
**kwargs
**kwargs,
):
self.address = address
self.ethereum_client = ethereum_client
Expand Down
2 changes: 1 addition & 1 deletion gnosis/eth/django/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
self,
allow_zero_address: bool = False,
allow_sentinel_address: bool = False,
**kwargs
**kwargs,
):
self.allow_zero_address = allow_zero_address
self.allow_sentinel_address = allow_sentinel_address
Expand Down
105 changes: 105 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "safe-eth-py"
dynamic = ["version"]
description = "Safe Ecosystem Foundation utilities for Ethereum projects"
readme = "README.rst"
license = "MIT"
requires-python = ">=3.9"
authors = [
{ name = "Uxío", email = "uxio@safe.global" },
]
keywords = [
"cowswap",
"django",
"ethereum",
"gnosis",
"safe",
"web3",
]
classifiers = [
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 2.0",
"Framework :: Django :: 3.0",
"Framework :: Django :: 4.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
]
dependencies = [
"packaging",
"py-evm>=0.7.0a1",
"requests>=2",
"safe-pysha3>=1.0.0",
"web3>=6.2.0",
]

[project.optional-dependencies]
django = [
"django-filter>=2",
"django>=2",
"djangorestframework>=2",
]

[project.urls]
Documentation = "https://safe-eth-py.readthedocs.io/en/latest/"
Homepage = "https://github.com/safe-global/safe-eth-py"
Source = "https://github.com/safe-global/safe-eth-py"
Tracker = "https://github.com/safe-global/safe-eth-py/issues"

[tool.hatch.version]
path = "gnosis/__init__.py"

[tool.hatch.envs.types]
extra-dependencies = [
"mypy>=1.0.0",
]

[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:gnosis tests}"

[tool.coverage.run]
include = ["gnosis/*"]
# source_pkgs = ["prueba", "tests"]
branch = true
parallel = true
omit = [
"*__init__.py*",
"*tests*",
"*/migrations/*",
]

#[tool.coverage.paths]
#prueba = ["src/prueba", "*/prueba/src/prueba"]
#tests = ["tests", "*/prueba/tests"]

[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if settings.DEBUG",
"raise NotImplementedError",
"pass",
]

[tool.hatch.build.targets.sdist]
include = [
"/gnosis",
]
[tool.hatch.build.targets.wheel]
packages = [
"/gnosis",
]
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-r requirements-test.txt
flake8
gitpython
hatch
ipdb
ipython
isort
Expand Down
87 changes: 1 addition & 86 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,66 +1,3 @@
[metadata]
name = safe-eth-py
version = 6.0.0b30
description = Safe Ecosystem Foundation utilities for Ethereum projects
long_description = file: README.rst
long_description_content_type = text/x-rst; charset=UTF-8
keywords =
ethereum
web3
django
safe
cowswap
gnosis
url = https://github.com/safe-global/safe-eth-py
author = Uxío
author_email = uxio@safe.global
license = MIT License
license_files =
LICENSE
classifiers =
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 2.0
Framework :: Django :: 3.0
Framework :: Django :: 4.0
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Internet :: WWW/HTTP
Topic :: Internet :: WWW/HTTP :: Dynamic Content
project_urls =
Documentation = https://safe-eth-py.readthedocs.io/en/latest/
Source = https://github.com/safe-global/safe-eth-py
Tracker = https://github.com/safe-global/safe-eth-py/issues

[options]
packages = find:
platforms = any
include_package_data = True
install_requires =
packaging
py-evm>=0.7.0a1
safe-pysha3>=1.0.0
requests>=2
web3>=6.2.0
python_requires = >=3.9

[options.package_data]
gnosis =
py.typed
*.json

[options.extras_require]
django =
django>=2
django-filter>=2
djangorestframework>=2

[flake8]
max-line-length = 88
select = C,E,F,W,B,B950
Expand All @@ -84,31 +21,9 @@ env =
DJANGO_SETTINGS_MODULE=config.settings.test

[mypy]
python_version = 3.10
python_version = 3.12
check_untyped_defs = True
ignore_missing_imports = True
warn_unused_ignores = True
warn_redundant_casts = True
warn_unused_configs = True

[coverage:report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if __name__ == .__main__.:
if settings.DEBUG

# Ignore pass lines
pass

[coverage:run]
include = safe_transaction_service/*
omit =
*__init__.py*
*tests*
*/migrations/*
4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

0 comments on commit 3338939

Please sign in to comment.