ci: Configure isort and make it happy
This commit is contained in:
parent
d28ca167f2
commit
95039914ba
@ -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]
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user