Skip to content

Commit 39e3c22

Browse files
committed
fix: python3.7 typing fix
1 parent 1bc30f2 commit 39e3c22

File tree

4 files changed

+75
-43
lines changed

4 files changed

+75
-43
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,17 @@ dbt2looker
5252

5353
Requires [poetry](https://python-poetry.org/docs/) and python >=3.7
5454

55+
For development, it is recommended to use python 3.7:
56+
5557
```
56-
# Install
58+
# Ensure you're using 3.7
59+
poetry env use 3.7
60+
# alternative: poetry env use /usr/local/opt/[email protected]/bin/python3
61+
62+
# Install dependencies and main package
5763
poetry install
5864
59-
# Run
65+
# Run dbtlooker in poetry environment
6066
poetry run dbt2looker
6167
```
6268

dbt2looker/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from enum import Enum
2-
from typing import Union, Dict, List, Literal, Optional
2+
from typing import Union, Dict, List, Optional
3+
try:
4+
from typing import Literal
5+
except ImportError:
6+
from typing_extensions import Literal
37
from pydantic import BaseModel, Field, PydanticValueError, validator
48

59

poetry.lock

Lines changed: 60 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dbt2looker"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
description = "Generate lookml view files from dbt models"
55
authors = ["oliverlaslett <[email protected]>"]
66
license = "MIT"
@@ -14,6 +14,7 @@ lkml = "^1.1.0"
1414
pydantic = "^1.8.1"
1515
PyYAML = "^5.4.1"
1616
jsonschema = "^3.2.0"
17+
typing-extensions = "^3.10.0"
1718

1819
[tool.poetry.dev-dependencies]
1920

0 commit comments

Comments
 (0)