Skip to content

Commit

Permalink
fix alias better
Browse files Browse the repository at this point in the history
  • Loading branch information
augray committed Sep 1, 2024
1 parent b57a09a commit 41feffd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 29 deletions.
20 changes: 0 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@ wheel:
uvx pip wheel -w dist .
.PHONY: test-release

test-release: wheel
uvx twine check dist/*airtrain*.whl
uvx twine upload --repository testpypi dist/*airtrain*.whl

.PHONY: release
release: wheel
uvx twine check dist/*airtrain*.whl
uvx twine upload dist/*airtrain*.whl

.PHONY: test-release
test-release: wheel
uvx twine check dist/*airtrain*.whl
uvx twine upload --repository testpypi dist/*airtrain*.whl

.PHONY: release
release: wheel
uvx twine check dist/*airtrain*.whl
uvx twine upload dist/*airtrain*.whl

.PHONY: test-release
test-release: wheel
uvx twine check dist/*airtrain*.whl
uvx twine upload --repository testpypi dist/*airtrain*.whl
Expand Down
17 changes: 8 additions & 9 deletions src/airtrain/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,21 @@
from airtrain.client import client


# Unpack is only >3.11 . We'll just rely on type
# checking in those versions to catch mistakes.
# This will make Unpack[CreationArgs] into
# Optional[Any] for lower versions, which should
# pass checks.
Unpack = Optional
CreationArgs = Any

if sys.version_info > (3, 11):
from typing import TypedDict, Unpack

class CreationArgs(TypedDict):
name: Optional[str]
embedding_column: Optional[str]

else:
# Unpack is only >3.11 . We'll just rely on type
# checking in those versions to catch mistakes.
# This will make Unpack[CreationArgs] into
# Optional[Any] for lower versions, which should
# pass checks.
Unpack = Optional
CreationArgs = Any


logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 41feffd

Please sign in to comment.