ci: Configure isort and make it happy
This commit is contained in:
parent
d28ca167f2
commit
95039914ba
@ -30,3 +30,9 @@ repos:
|
|||||||
language: system
|
language: system
|
||||||
types: [python]
|
types: [python]
|
||||||
require_serial: true
|
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"""
|
"""Example SHS client"""
|
||||||
|
|
||||||
import os
|
|
||||||
from asyncio import get_event_loop
|
from asyncio import get_event_loop
|
||||||
from base64 import b64decode
|
from base64 import b64decode
|
||||||
|
import os
|
||||||
|
|
||||||
import yaml
|
|
||||||
from nacl.signing import SigningKey
|
from nacl.signing import SigningKey
|
||||||
|
import yaml
|
||||||
|
|
||||||
from secret_handshake import SHSClient
|
from secret_handshake import SHSClient
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""Example SHS server"""
|
"""Example SHS server"""
|
||||||
|
|
||||||
import os
|
|
||||||
from asyncio import get_event_loop
|
from asyncio import get_event_loop
|
||||||
from base64 import b64decode
|
from base64 import b64decode
|
||||||
|
import os
|
||||||
|
|
||||||
import yaml
|
|
||||||
from nacl.signing import SigningKey
|
from nacl.signing import SigningKey
|
||||||
|
import yaml
|
||||||
|
|
||||||
from secret_handshake import SHSServer
|
from secret_handshake import SHSServer
|
||||||
|
|
||||||
|
@ -51,6 +51,11 @@ skip_covered = true
|
|||||||
fail_under = 91
|
fail_under = 91
|
||||||
omit = ["examples/*"]
|
omit = ["examples/*"]
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
force_sort_within_sections = true
|
||||||
|
line_length = 100
|
||||||
|
profile = "black"
|
||||||
|
|
||||||
[tool.pylint.format]
|
[tool.pylint.format]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
|
|
||||||
|
@ -42,7 +42,10 @@ class AsyncBuffer(BytesIO):
|
|||||||
|
|
||||||
async def async_comprehend(generator):
|
async def async_comprehend(generator):
|
||||||
"""Emulate ``[elem async for elem in generator]``."""
|
"""Emulate ``[elem async for elem in generator]``."""
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
async for msg in generator:
|
async for msg in generator:
|
||||||
results.append(msg)
|
results.append(msg)
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
import pytest
|
|
||||||
from nacl.public import PrivateKey
|
from nacl.public import PrivateKey
|
||||||
from nacl.signing import SigningKey
|
from nacl.signing import SigningKey
|
||||||
|
import pytest
|
||||||
|
|
||||||
from secret_handshake.crypto import SHSClientCrypto, SHSServerCrypto
|
from secret_handshake.crypto import SHSClientCrypto, SHSServerCrypto
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@
|
|||||||
|
|
||||||
"""Tests for the networking components"""
|
"""Tests for the networking components"""
|
||||||
|
|
||||||
import os
|
|
||||||
from asyncio import Event, wait_for
|
from asyncio import Event, wait_for
|
||||||
|
import os
|
||||||
|
|
||||||
import pytest
|
|
||||||
from nacl.signing import SigningKey
|
from nacl.signing import SigningKey
|
||||||
|
import pytest
|
||||||
|
|
||||||
from secret_handshake import SHSClient, SHSServer
|
from secret_handshake import SHSClient, SHSServer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user