Skip to content

Conversation

@bryanforbes
Copy link
Contributor

No description provided.

Copy link
Contributor

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

This doesn't cause any significant issues in our codebases, so I think this is good to go.

Btw, do I need to update any checkboxes in #3?

primary_key: bool = ...
foreign_keys: List[ForeignKey] = ...
key: Optional[str] = ...
def self_group(self: _CE, against: Optional[Any] = ...) -> Union[AsBoolean, Grouping[_T], _CE]: ...
Copy link
Contributor

Choose a reason for hiding this comment

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

Normally we try to avoid such unions in return types. But this one is probably OK.

def scalar(self) -> Any: ... # type: ignore # incompatible with Executable.scalar
def execute(self) -> ResultProxy: ... # type: ignore # incompatible with Executable.execute
def self_group(self, against: Optional[Any] = ...) -> Union[ColumnElement[_T], Grouping[_T]]: ...
def self_group(self: _FE, against: Optional[Any] = ...) -> Union[AsBoolean, Grouping[_T], _FE]: ...
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment about union return here. If people will complain, then we can replace this with Any.

@ilevkivskyi ilevkivskyi merged commit 1577a20 into dropbox:master Dec 18, 2018
@bryanforbes
Copy link
Contributor Author

Yeah, you can check the ones for sql/functions.pyi and sql/schema.pyi

@ilevkivskyi
Copy link
Contributor

👍

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.

2 participants