Skip to content

Conversation

@carlos-villavicencio-adsk
Copy link
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk commented Oct 28, 2025

Closes #393
Thanks @chadrik

@carlos-villavicencio-adsk carlos-villavicencio-adsk requested a review from a team October 28, 2025 21:33
"""

import datetime
from typing import Any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like using things from outside without having a package/module name.

Suggested change
from typing import Any
import typing

Then use typing.Any.

If you are looking for a short version, we can always aggree on

import typing as tp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a subjective personal preference, and we cannot enforce this. I agree on being explicit and importing the objects specifically.


@classmethod
def get_schemas(cls, schema_path, schema_entity_path):
def get_schemas(cls, schema_path: str, schema_entity_path: str) -> tuple:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return value: tuple of what? Can we define string/int/dict/... ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll leave it as is, since it's a unit testing helper method. Not everything in Mockgun has been typed so far.

direction: str


class BaseEntity(TypedDict, total=False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this total=False syntax? I never saw that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means that we don't expect to require all the defined fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants