Skip to content

Commit

Permalink
Merge pull request nucypher#129 from piotr-roslaniec/ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec authored Dec 4, 2023
2 parents 8776986 + 2307d54 commit 29fe80d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/umbral-pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,16 @@ jobs:
working-directory: umbral-pre-python

- name: Install pip dependencies
run: pip install mypy
run: pip install mypy ruff

- name: Run mypy.stubtest
run: python -m mypy.stubtest umbral_pre --allowlist stubtest-allowlist.txt
working-directory: umbral-pre-python

- name: Run ruff
run: ruff check --output-format=github umbral_pre
working-directory: umbral-pre-python

trigger-wheels:
runs-on: ubuntu-latest
needs: test
Expand Down
4 changes: 4 additions & 0 deletions umbral-pre-python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools-rust"]

[tool.ruff]
exclude = ["umbral_pre/__init__.py"] # false-positive unused-import
select = ["E", "F", "I"]
14 changes: 10 additions & 4 deletions umbral-pre-python/umbral_pre/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from typing import Optional, Tuple, List, final, Sequence

from typing import List, Optional, Sequence, Tuple, final

@final
class SecretKey:
Expand Down Expand Up @@ -55,7 +54,10 @@ class PublicKey:
...

@staticmethod
def recover_from_prehash(prehash: bytes, signature: RecoverableSignature) -> PublicKey:
def recover_from_prehash(
prehash: bytes,
signature: RecoverableSignature
) -> PublicKey:
...


Expand Down Expand Up @@ -122,7 +124,11 @@ def encrypt(delegating_pk: PublicKey, plaintext: bytes) -> Tuple[Capsule, bytes]
...


def decrypt_original(delegating_sk: SecretKey, capsule: Capsule, ciphertext: bytes) -> bytes:
def decrypt_original(
delegating_sk: SecretKey,
capsule: Capsule,
ciphertext: bytes
) -> bytes:
...


Expand Down

0 comments on commit 29fe80d

Please sign in to comment.