-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve typing in expressions module. #851
Conversation
100b155
to
fc5a603
Compare
fc5a603
to
5af8b9b
Compare
from pynamodb.attributes import Attribute | ||
from pynamodb.expressions.operand import Path | ||
from pynamodb.expressions.util import substitute_names | ||
|
||
|
||
def create_projection_expression(attributes_to_get, placeholders): | ||
def create_projection_expression(attributes_to_get, placeholders: Dict[str, str]) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attributes_to_get
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that comes from connection base where it's typed as Optional[Any]
-- so far I've inferred its:
Union[List[Attribute], List[Path], List[str], Attribute, Path, str]
but I was going to punt on it for now
@@ -44,10 +44,6 @@ def __repr__(self): | |||
values = [str(value) for value in self.values] | |||
return self.format_string.format(*values, operator=self.operator) | |||
|
|||
def __nonzero__(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
No description provided.