Skip to content

Commit

Permalink
various cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jan 9, 2024
1 parent 018dbb3 commit fa2c8ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion python-bindings/pythonbindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ PYBIND11_MODULE(blspy, m)

py::class_<Util>(m, "Util").def("hash256", [](const py::bytes &message) {
std::string str(message);
const uint8_t *input = reinterpret_cast<const uint8_t *>(str.data());
uint8_t output[BLS::MESSAGE_HASH_LEN];
{
py::gil_scoped_release release;
Expand Down
6 changes: 2 additions & 4 deletions python-bindings/test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# flake8: noqa: E501
import binascii
import time
from copy import deepcopy

from blspy import (
AugSchemeMPL,
Expand All @@ -10,7 +9,6 @@
G2Element,
PopSchemeMPL,
PrivateKey,
Util,
)


Expand Down Expand Up @@ -134,15 +132,15 @@ def test_vectors_invalid():
for s in invalid_inputs_1:
bytes_ = binascii.unhexlify(s)
try:
g1 = G1Element(bytes_)
G1Element(bytes_)
assert False, "Failed to disallow creation of G1 element."
except Exception as e:
pass

for s in invalid_inputs_2:
bytes_ = binascii.unhexlify(s)
try:
g2 = G2Element(bytes_)
G2Element(bytes_)
assert False, "Failed to disallow creation of G2 element."
except Exception as e:
pass
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import platform
import subprocess
import sys
from pathlib import Path
from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext

Expand Down Expand Up @@ -68,7 +69,7 @@ def build_extension(self, ext):
description="BLS signatures in c++ (python bindings)",
python_requires=">=3.7",
install_requires=["wheel"],
long_description=open("README.md").read(),
long_description=Path("README.md").read_text(),
long_description_content_type="text/markdown",
url="https://github.com/Chia-Network/bls-signatures",
ext_modules=[CMakeExtension("blspy", ".")],
Expand Down

0 comments on commit fa2c8ae

Please sign in to comment.