ci: Configure isort and make it happy

This commit is contained in:
Gergely Polonkai 2023-10-29 10:47:21 +01:00
parent d28ca167f2
commit 95039914ba
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
7 changed files with 21 additions and 7 deletions

View File

@ -30,3 +30,9 @@ repos:
language: system
types: [python]
require_serial: true
- id: isort
name: isort
entry: poetry run isort
language: system
require_serial: true
types_or: [python, pyi]

View File

@ -1,11 +1,11 @@
"""Example SHS client"""
import os
from asyncio import get_event_loop
from base64 import b64decode
import os
import yaml
from nacl.signing import SigningKey
import yaml
from secret_handshake import SHSClient

View File

@ -1,11 +1,11 @@
"""Example SHS server"""
import os
from asyncio import get_event_loop
from base64 import b64decode
import os
import yaml
from nacl.signing import SigningKey
import yaml
from secret_handshake import SHSServer

View File

@ -51,6 +51,11 @@ skip_covered = true
fail_under = 91
omit = ["examples/*"]
[tool.isort]
force_sort_within_sections = true
line_length = 100
profile = "black"
[tool.pylint.format]
max-line-length = 120

View File

@ -42,7 +42,10 @@ class AsyncBuffer(BytesIO):
async def async_comprehend(generator):
"""Emulate ``[elem async for elem in generator]``."""
results = []
async for msg in generator:
results.append(msg)
return results

View File

@ -22,9 +22,9 @@
import hashlib
import pytest
from nacl.public import PrivateKey
from nacl.signing import SigningKey
import pytest
from secret_handshake.crypto import SHSClientCrypto, SHSServerCrypto

View File

@ -20,11 +20,11 @@
"""Tests for the networking components"""
import os
from asyncio import Event, wait_for
import os
import pytest
from nacl.signing import SigningKey
import pytest
from secret_handshake import SHSClient, SHSServer