Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix imports according to PEP8 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions ota_suit_server/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env python
import asyncio
import hashlib
import logging
from pathlib import Path
import os.path

from aiohttp import web
import aiohttp_jinja2
Expand All @@ -9,15 +13,8 @@
from . import routes
from . import resources

import asyncio
import hashlib
import logging
from pathlib import Path
import os.path

PROJECT_ROOT = '.'


def get_files():
p = Path('./uploads')
files = []
Expand Down
4 changes: 1 addition & 3 deletions ota_suit_server/gen_manifest.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#!/usr/bin/env python

import argparse
import base64
import binascii
import calendar
import cbor
import hashlib
import os
import os.path
import time
import uuid

import cbor
import ed25519
from pyasn1.type import univ
from pyasn1.type.namedtype import NamedType, NamedTypes
Expand Down
5 changes: 3 additions & 2 deletions ota_suit_server/resources.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import aiocoap
import aiocoap.resource as resource

from collections import namedtuple
import hashlib
import os.path
from pathlib import Path

import aiocoap
import aiocoap.resource as resource

def check_exists(uploads, name, digest):
for upload in uploads:
Expand Down
4 changes: 2 additions & 2 deletions ota_suit_server/routes.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from . import views
from . import gen_manifest

import os.path

from . import views
from . import gen_manifest

def setup_routes(app, root):
app.router.add_get('/', views.index)
Expand Down
6 changes: 3 additions & 3 deletions ota_suit_server/views.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from . import resources

import logging

from aiohttp import web
import aiocoap
import aiohttp_jinja2
from multidict import MultiDict

import logging

from . import resources

async def index(request):
text = """
Expand Down