Skip to content

Commit

Permalink
fix: Add and correct type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Jun 20, 2024
1 parent acb3108 commit cb8223b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ services:
- ./docker/clickhouse/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./docker/clickhouse/config.xml:/etc/clickhouse-server/config.xml
- ./docker/clickhouse/users-dev.xml:/etc/clickhouse-server/users.xml
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- kafka
- zookeeper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ async def assert_clickhouse_records_in_s3(
assert s3_data == expected_records


TEST_S3_MODELS: list[BatchExportModel, BatchExportSchema | None] = [
TEST_S3_MODELS: list[BatchExportModel | BatchExportSchema | None] = [
BatchExportModel(
name="a-custom-model",
schema={
Expand Down Expand Up @@ -886,7 +886,7 @@ async def test_s3_export_workflow_with_minio_bucket_and_custom_key_prefix(
assert run.records_completed == events_to_export_created or run.records_completed == persons_to_export_created

expected_key_prefix = s3_key_prefix.format(
table=model.name if model is not None else "events",
table=batch_export_model.name if batch_export_model is not None else "events",
year=data_interval_end.year,
# All of these must include leading 0s.
month=data_interval_end.strftime("%m"),
Expand Down
6 changes: 3 additions & 3 deletions posthog/temporal/tests/utils/persons.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def generate_test_persons(
persons: list[PersonValues] = []
for _ in range(start, count + start):
timestamp = timestamps.pop()
person = {
person: PersonValues = {
"id": str(person_id) if person_id else str(uuid.uuid4()),
"created_at": timestamp.strftime("%Y-%m-%d %H:%M:%S.%f"),
"team_id": team_id,
Expand Down Expand Up @@ -160,7 +160,7 @@ def generate_test_person_distinct_id2(
person_id: uuid.UUID | None = None,
version: int = 1,
is_deleted: bool = False,
) -> list[PersonDistinctId2Values]:
) -> PersonDistinctId2Values:
"""Generate a row of person_distinct_id2 values for testing."""
person: PersonDistinctId2Values = {
"team_id": team_id,
Expand Down Expand Up @@ -212,7 +212,7 @@ async def generate_test_person_distinct_id2_in_clickhouse(
person_id: uuid.UUID | None = None,
version: int = 1,
is_deleted: bool = False,
) -> tuple[list[PersonDistinctId2Values], list[PersonDistinctId2Values]]:
) -> tuple[PersonDistinctId2Values, PersonDistinctId2Values]:
person = generate_test_person_distinct_id2(
count=1,
team_id=team_id,
Expand Down

0 comments on commit cb8223b

Please sign in to comment.