Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Oct 25, 2023
1 parent fde9dc2 commit eeb3dd7
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ lint:
hatch run dev-env:pre-commit run --show-diff-on-failure --color=always --all-files

json_schema:
hatch run dev-env:python dbt_semantic_interfaces/parsing/generate_json_schema_file.py
hatch run dev-env:python dbt_semantic_interfaces/parsing/generate_json_schema_file.py
6 changes: 4 additions & 2 deletions dbt_semantic_interfaces/implementations/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

from typing import Optional

from typing_extensions import override
from pydantic import Field
from typing_extensions import override

from dbt_semantic_interfaces.implementations.base import HashableBaseModel
from dbt_semantic_interfaces.protocols import ProtocolHint
from dbt_semantic_interfaces.protocols.export import Export, ExportConfig
from dbt_semantic_interfaces.type_enums.export_destination_type import ExportDestinationType
from dbt_semantic_interfaces.type_enums.export_destination_type import (
ExportDestinationType,
)


class PydanticExportConfig(HashableBaseModel, ProtocolHint[ExportConfig]):
Expand Down
2 changes: 1 addition & 1 deletion dbt_semantic_interfaces/implementations/saved_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
HashableBaseModel,
ModelWithMetadataParsing,
)
from dbt_semantic_interfaces.implementations.export import PydanticExport
from dbt_semantic_interfaces.implementations.filters.where_filter import (
PydanticWhereFilterIntersection,
)
from dbt_semantic_interfaces.implementations.metadata import PydanticMetadata
from dbt_semantic_interfaces.implementations.export import PydanticExport
from dbt_semantic_interfaces.protocols import ProtocolHint
from dbt_semantic_interfaces.protocols.saved_query import SavedQuery

Expand Down
8 changes: 6 additions & 2 deletions dbt_semantic_interfaces/protocols/export.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
from __future__ import annotations
from typing import Protocol, Optional

from abc import abstractmethod
from dbt_semantic_interfaces.type_enums.export_destination_type import ExportDestinationType
from typing import Optional, Protocol

from dbt_semantic_interfaces.type_enums.export_destination_type import (
ExportDestinationType,
)


class Export(Protocol):
Expand Down
4 changes: 2 additions & 2 deletions dbt_semantic_interfaces/protocols/saved_query.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from abc import abstractmethod
from typing import Optional, Protocol, Sequence, List
from typing import List, Optional, Protocol, Sequence

from dbt_semantic_interfaces.protocols.metadata import Metadata
from dbt_semantic_interfaces.protocols.export import Export
from dbt_semantic_interfaces.protocols.metadata import Metadata
from dbt_semantic_interfaces.protocols.where_filter import WhereFilterIntersection


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ saved_query:
config:
export_as: table
schema: exports_schema
alias: bookings_export_table
alias: bookings_export_table
4 changes: 3 additions & 1 deletion tests/parsing/test_saved_query_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
parse_yaml_files_to_semantic_manifest,
)
from dbt_semantic_interfaces.parsing.objects import YamlConfigFile
from dbt_semantic_interfaces.type_enums.export_destination_type import (
ExportDestinationType,
)
from tests.example_project_configuration import (
EXAMPLE_PROJECT_CONFIGURATION_YAML_CONFIG_FILE,
)
from dbt_semantic_interfaces.type_enums.export_destination_type import ExportDestinationType


def test_saved_query_metadata_parsing() -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_implements_satisfy_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
PydanticMeasureAggregationParameters,
PydanticNonAdditiveDimensionParameters,
)
from dbt_semantic_interfaces.implementations.export import PydanticExport
from dbt_semantic_interfaces.implementations.filters.where_filter import (
PydanticWhereFilter,
)
Expand All @@ -31,7 +32,6 @@
from dbt_semantic_interfaces.implementations.semantic_manifest import (
PydanticSemanticManifest,
)
from dbt_semantic_interfaces.implementations.export import PydanticExport
from dbt_semantic_interfaces.implementations.semantic_model import PydanticSemanticModel
from dbt_semantic_interfaces.implementations.time_spine_table_configuration import (
PydanticTimeSpineTableConfiguration,
Expand Down

0 comments on commit eeb3dd7

Please sign in to comment.