Skip to content

Commit

Permalink
Add isort to flake8 linting (#16)
Browse files Browse the repository at this point in the history
(DIS-1789)
  • Loading branch information
pyrco authored Feb 7, 2023
1 parent 01030b7 commit e35e7ec
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 13 deletions.
1 change: 0 additions & 1 deletion dissect/esedb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
NoNeighbourPageError,
)


__all__ = [
"EseDB",
"Error",
Expand Down
2 changes: 1 addition & 1 deletion dissect/esedb/c_esedb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import datetime
import uuid
import struct
import uuid
from collections import namedtuple
from typing import Union

Expand Down
2 changes: 1 addition & 1 deletion dissect/esedb/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from typing import TYPE_CHECKING, Union

from dissect.esedb.page import Page, Node
from dissect.esedb.exceptions import KeyNotFoundError, NoNeighbourPageError
from dissect.esedb.page import Node, Page

if TYPE_CHECKING:
from dissect.esedb.esedb import EseDB
Expand Down
4 changes: 2 additions & 2 deletions dissect/esedb/esedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from functools import cached_property, lru_cache
from typing import BinaryIO, Iterator

from dissect.esedb.page import Page
from dissect.esedb.table import Catalog, Table
from dissect.esedb.c_esedb import c_esedb, pgnoFDPMSO, ulDAEMagic
from dissect.esedb.exceptions import InvalidDatabase
from dissect.esedb.page import Page
from dissect.esedb.table import Catalog, Table


class EseDB:
Expand Down
2 changes: 1 addition & 1 deletion dissect/esedb/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from functools import cached_property
from typing import TYPE_CHECKING, Iterator, Optional, Union

from dissect.esedb.c_esedb import c_esedb, PAGE_FLAG, TAG_FLAG
from dissect.esedb.c_esedb import PAGE_FLAG, TAG_FLAG, c_esedb

if TYPE_CHECKING:
from dissect.esedb.esedb import EseDB
Expand Down
8 changes: 7 additions & 1 deletion dissect/esedb/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
from typing import TYPE_CHECKING, Any, Iterator, Optional

from dissect.esedb import compression
from dissect.esedb.c_esedb import CODEPAGE, COLUMN_TYPE_MAP, SYSOBJ, ColumnType, JET_coltyp
from dissect.esedb.c_esedb import (
CODEPAGE,
COLUMN_TYPE_MAP,
SYSOBJ,
ColumnType,
JET_coltyp,
)
from dissect.esedb.cursor import Cursor
from dissect.esedb.exceptions import NoNeighbourPageError
from dissect.esedb.index import Index
Expand Down
3 changes: 1 addition & 2 deletions dissect/esedb/tools/sru.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
from typing import BinaryIO, Iterator, Optional

from dissect.util.sid import read_sid
from dissect.util.ts import wintimestamp, oatimestamp
from dissect.util.ts import oatimestamp, wintimestamp

from dissect.esedb.c_esedb import RecordValue
from dissect.esedb.esedb import EseDB
from dissect.esedb.record import Record, serialise_record_column_values
from dissect.esedb.table import Table


NATIVE_TYPE_MAP = {
"{DD6636C4-8929-4683-974E-22C046A43763}": {"ConnectStartTime": wintimestamp},
"{5C8CF1C7-7257-4F13-B223-970EF5939312}": {"EndTime": wintimestamp},
Expand Down
1 change: 0 additions & 1 deletion dissect/esedb/tools/ual.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from dissect.esedb.esedb import EseDB
from dissect.esedb.table import Table


UalValue = Union[RecordValue, ipaddress.IPv4Address, ipaddress.IPv6Interface, Tuple[datetime.datetime]]

SKIP_TABLES = [
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup, find_packages
from setuptools import find_packages, setup

setup(
name="dissect.esedb",
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
import gzip
import os

import pytest

Expand Down
2 changes: 1 addition & 1 deletion tests/test_esedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from dissect.util.ts import oatimestamp

from dissect.esedb.esedb import EseDB
from dissect.esedb.c_esedb import JET_coltyp
from dissect.esedb.esedb import EseDB


def test_basic_types(basic_db):
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ deps =
black==23.1.0
flake8
flake8-black
flake8-isort
vermin
commands =
flake8 dissect tests setup.py
Expand Down

0 comments on commit e35e7ec

Please sign in to comment.