Skip to content

Commit

Permalink
update isort to python version 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
daringer committed Dec 27, 2022
1 parent 6a67327 commit 6dfdb91
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PYTHON3=python3

BLACK_FLAGS=-t py35 --extend-exclude pynitrokey/nethsm/client
FLAKE8_FLAGS=--extend-exclude pynitrokey/nethsm/client
ISORT_FLAGS=--py 35 --extend-skip pynitrokey/nethsm/client
ISORT_FLAGS=--py 39 --extend-skip pynitrokey/nethsm/client

# whitelist of directories for flake8
FLAKE8_DIRS=pynitrokey/nethsm pynitrokey/cli/nk3 pynitrokey/nk3
Expand Down
3 changes: 1 addition & 2 deletions pynitrokey/cli/nk3/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
import logging
import platform
import sys
from dataclasses import dataclass
from enum import Enum, auto, unique
from hashlib import sha256
from types import TracebackType
from typing import Any, Callable, Iterable, List, Optional, Tuple, Type, Union

from dataclasses import dataclass

from pynitrokey.cli.exceptions import CliException
from pynitrokey.fido2 import device_path_to_str
from pynitrokey.helpers import local_print
Expand Down
2 changes: 1 addition & 1 deletion pynitrokey/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import logging
import os
import pathlib
import secrets
from functools import partial

import pytest
import secrets
from _pytest.fixtures import FixtureRequest

from pynitrokey.cli import CliException
Expand Down
2 changes: 1 addition & 1 deletion pynitrokey/fido2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
import binascii
import hashlib
import json
import secrets
import struct
import sys
import tempfile
import time
from getpass import getpass
from typing import Any, Optional

import secrets
from fido2.client import Fido2Client, UserInteraction
from fido2.ctap import CtapError
from fido2.ctap1 import Ctap1
Expand Down
3 changes: 1 addition & 2 deletions pynitrokey/nk3/bootloader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
import logging
import sys
from abc import abstractmethod
from dataclasses import dataclass
from re import Pattern
from typing import Callable, List, Optional

from dataclasses import dataclass

from ..base import Nitrokey3Base
from ..utils import Version

Expand Down
2 changes: 1 addition & 1 deletion pynitrokey/nk3/bootloader/nrf52.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
import logging
import re
import time
from dataclasses import dataclass
from io import BytesIO
from typing import Optional
from zipfile import ZipFile

import ecdsa
import ecdsa.curves
from dataclasses import dataclass
from ecdsa.keys import BadSignatureError
from nordicsemi.dfu.dfu_transport import DfuEvent
from nordicsemi.dfu.dfu_transport_serial import DfuTransportSerial
Expand Down
4 changes: 2 additions & 2 deletions pynitrokey/nk3/otp_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
Used through CTAPHID transport, via the custom vendor command.
Can be used directly over CCID as well.
"""
import dataclasses
import hmac
import logging
import typing
from enum import Enum
from hashlib import pbkdf2_hmac
from secrets import token_bytes
from struct import pack
from typing import List, Optional

import dataclasses
import tlv8
from secrets import token_bytes

from pynitrokey.nk3 import Nitrokey3Device
from pynitrokey.start.gnuk_token import iso7816_compose
Expand Down
2 changes: 1 addition & 1 deletion pynitrokey/nk3/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# http://opensource.org/licenses/MIT>, at your option. This file may not be
# copied, modified, or distributed except according to those terms.

from dataclasses import dataclass
from functools import total_ordering
from typing import Tuple

from dataclasses import dataclass
from spsdk.sbfile.misc import BcdVersion3


Expand Down
2 changes: 1 addition & 1 deletion pynitrokey/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

import os.path
import urllib.parse
from dataclasses import dataclass
from typing import BinaryIO, Callable, Dict, Generator, Optional, Pattern

import requests
from dataclasses import dataclass

API_BASE_URL = "https://api.github.com"

Expand Down

0 comments on commit 6dfdb91

Please sign in to comment.