udim commented on a change in pull request #11038: [BEAM-7746] More typing fixes
URL: https://github.com/apache/beam/pull/11038#discussion_r394034914
##########
File path: sdks/python/apache_beam/ml/gcp/naturallanguageml.py
##########
@@ -74,7 +75,9 @@ def __init__(
def to_dict(document):
# type: (Document) -> Mapping[str, Optional[str]]
if document.from_gcs:
- dict_repr = {'gcs_content_uri': document.content}
+ dict_repr = {
+ 'gcs_content_uri': document.content
+ } # type: Dict[str, Optional[str]]
Review comment:
`document.content` is not Optional
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services