From 7e954f7daa61cf3085e4e9415b92a85ed711a341 Mon Sep 17 00:00:00 2001 From: vgrem Date: Mon, 1 Apr 2024 13:38:36 +0300 Subject: [PATCH] 2.5.7 release --- office365/sharepoint/attachments/attachment.py | 12 +++--------- office365/sharepoint/contenttypes/content_type.py | 12 ++++++++++++ setup.py | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/office365/sharepoint/attachments/attachment.py b/office365/sharepoint/attachments/attachment.py index d44719c5..84d297fa 100644 --- a/office365/sharepoint/attachments/attachment.py +++ b/office365/sharepoint/attachments/attachment.py @@ -76,16 +76,12 @@ def _upload_file_by_path(): @property def file_name(self): # type: () -> Optional[str] - """ - Specifies the file name of the list item attachment. - """ + """Specifies the file name of the list item attachment.""" return self.properties.get("FileName", None) @property def file_name_as_path(self): - """ - The file name of the attachment as a SP.ResourcePath. - """ + """The file name of the attachment as a SP.ResourcePath.""" return self.properties.get("FileNameAsPath", SPResPath()) @property @@ -96,9 +92,7 @@ def server_relative_url(self): @property def server_relative_path(self): - """ - The server-relative-path of the attachment. - """ + """The server-relative-path of the attachment.""" return self.properties.get("ServerRelativePath", SPResPath()) @property diff --git a/office365/sharepoint/contenttypes/content_type.py b/office365/sharepoint/contenttypes/content_type.py index 5e23791e..85efff23 100644 --- a/office365/sharepoint/contenttypes/content_type.py +++ b/office365/sharepoint/contenttypes/content_type.py @@ -111,6 +111,12 @@ def id(self): """ return self.properties.get("Id", ContentTypeId()) + @property + def scope(self): + # type: () -> Optional[str] + """Specifies a server-relative path to the content type scope of the content type.""" + return self.properties.get("Scope", None) + @property def sealed(self): # type: () -> Optional[bool] @@ -142,6 +148,12 @@ def new_form_client_side_component_properties(self): item forms""" return self.properties.get("NewFormClientSideComponentProperties", None) + @property + def new_form_url(self): + # type: () -> Optional[str] + """Specifies the URL of a custom new form to use for list items that have been assigned the content type.""" + return self.properties.get("NewFormUrl", None) + @property def description(self): # type: () -> Optional[str] diff --git a/setup.py b/setup.py index 8a5c7322..d6e54ed6 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="Office365-REST-Python-Client", - version="2.5.6", + version="2.5.7", author="Vadim Gremyachev", author_email="vvgrem@gmail.com", maintainer="Konrad GÄ…dek, Domenico Di Nicola",