Skip to content

Commit

Permalink
Move mock dlt message to dltlyse module (#4)
Browse files Browse the repository at this point in the history
* Move mock dlt message to dltlyse module

* fix: bypass unused package

The packages are used by type annotation. They are used in comments
so flake8 could not detect it.
  • Loading branch information
yen3 authored Nov 24, 2022
1 parent fdb9353 commit 0b86a73
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dltlyse/core/analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import sys
import time
import traceback
from typing import DefaultDict, Dict, Iterable, List, Tuple, TypeVar
from typing import DefaultDict, Dict, Iterable, List, Tuple, TypeVar # noqa: F401

from dlt import dlt

Expand Down
File renamed without changes.
Empty file.
6 changes: 3 additions & 3 deletions tests/unittests/test_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import signal
import threading
import time
from typing import List, Tuple, Union
from typing import List, Tuple, Union # noqa: F401
from unittest.mock import ANY, call, MagicMock, patch

import pytest

from dlt.dlt import cDLT_FILE_NOT_OPEN_ERROR, DLT_EMPTY_FILE_ERROR, DLTMessage
from dlt.dlt import cDLT_FILE_NOT_OPEN_ERROR, DLT_EMPTY_FILE_ERROR, DLTMessage # noqa: F401
from dlt.core import API_VER as DLT_VERSION_STR
from dltlyse.core.analyser import DLTAnalyser, DLTLifecycle, DltlysePluginCollector
from dltlyse.core.utils import (
Expand All @@ -20,7 +20,7 @@
single_random_dlt_message,
start_dlt_message,
)
from tests.unittests.plugins.helpers import MockDLTMessage
from dltlyse.mock_dlt_message import MockDLTMessage


try:
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test_call_backs_and_report_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from unittest.mock import Mock, call # pylint: disable=no-name-in-module,import-error

from dltlyse.core.plugin_base import CallBacksAndReportPlugin, dlt_callback
from tests.unittests.plugins.helpers import MockDLTMessage
from dltlyse.mock_dlt_message import MockDLTMessage


class CallBacksAndReportPluginForTesting(CallBacksAndReportPlugin):
Expand Down

0 comments on commit 0b86a73

Please sign in to comment.