Some checks failed
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
16 lines
352 B
Python
16 lines
352 B
Python
import sys
|
|
from typing import Union, Any, cast
|
|
|
|
print(f"Python version: {sys.version}")
|
|
|
|
try:
|
|
from typing import Union
|
|
types = (int, str)
|
|
# This is what SQLAlchemy does:
|
|
res = cast(Any, Union).__getitem__(types)
|
|
print(f"Success: {res}")
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
import traceback
|
|
traceback.print_exc()
|