Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xiafu-msft committed Jul 21, 2020
1 parent 47b6aee commit 4c018c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,18 @@ def get_file_properties(self, **kwargs):
"""
return self._get_path_properties(cls=FileProperties._deserialize_file_properties, **kwargs) # pylint: disable=protected-access

def set_file_expiry(self, expiry_options, expires_on=None, **kwargs):
# type: (**Any) -> None
def set_file_expiry(self, expiry_options, # type: str
expires_on=None, # type: Optional[Union[datetime, int]]
**kwargs):
# type: (str, Optional[Union[datetime, int]], **Any) -> None
"""Sets the time a file will expire and be deleted.
:param str expiry_options:
Required. Indicates mode of the expiry time.
Possible values include: 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'
:param datetime expires_on:
The time to set the file to expiry
:param datetime or int expires_on:
The time to set the file to expiry.
When expiry_options is RelativeTo*, expires_on should be an int in milliseconds
:keyword int timeout:
The timeout parameter is expressed in seconds.
:rtype: None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,18 @@ async def get_file_properties(self, **kwargs):
"""
return await self._get_path_properties(cls=FileProperties._deserialize_file_properties, **kwargs) # pylint: disable=protected-access

async def set_file_expiry(self, expiry_options, expires_on=None, **kwargs):
# type: (**Any) -> None
async def set_file_expiry(self, expiry_options, # type: str
expires_on=None, # type: Optional[Union[datetime, int]]
**kwargs):
# type: (str, Optional[Union[datetime, int]], **Any) -> None
"""Sets the time a file will expire and be deleted.
:param str expiry_options:
Required. Indicates mode of the expiry time.
Possible values include: 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'
:param datetime expires_on:
The time to set the file to expiry
:param datetime or int expires_on:
The time to set the file to expiry.
When expiry_options is RelativeTo*, expires_on should be an int in milliseconds
:keyword int timeout:
The timeout parameter is expressed in seconds.
:rtype: None
Expand Down

0 comments on commit 4c018c4

Please sign in to comment.