Skip to content

Commit 0efc1e0

Browse files
committed
fix linter issues
1 parent 3354fd7 commit 0efc1e0

File tree

6 files changed

+46
-21
lines changed

6 files changed

+46
-21
lines changed

examples/sharepoint/listitems/get_deleted.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from tests import test_client_credentials, test_team_site_url
77

88
ctx = ClientContext(test_team_site_url).with_credentials(test_client_credentials)
9-
result = (
10-
ctx.web.recycle_bin.get().execute_query()
11-
)
9+
result = ctx.web.recycle_bin.get().execute_query()
1210
for item in result:
1311
print(item.properties)

generator/metadata/SharePoint.xml

+35-4
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,7 @@
10731073
<Property Name="ContentVersion" Type="Edm.Int32" Nullable="false"/>
10741074
<Property Name="Entropy" Type="Edm.String"/>
10751075
<Property Name="ETag" Type="Edm.String"/>
1076+
<Property Name="FieldValues" Type="Collection(SP.KeyValue)"/>
10761077
<Property Name="IsLowPriorityRequest" Type="Edm.Boolean" Nullable="false"/>
10771078
<Property Name="IsMediaServiceRequest" Type="Edm.Boolean" Nullable="false"/>
10781079
<Property Name="MachineLearningSampleMeta" Type="SP.MachineLearningSampleMeta"/>
@@ -10559,6 +10560,9 @@
1055910560
<Parameter Name="partitionColumnName" Type="Edm.String"/>
1056010561
<Parameter Name="columnsToChecksum" Type="Collection(Edm.String)"/>
1056110562
</FunctionImport>
10563+
<FunctionImport Name="GetCPSChangeToken" ReturnType="Edm.Int64" IsBindable="true">
10564+
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
10565+
</FunctionImport>
1056210566
<FunctionImport Name="GetDatabaseProperties" ReturnType="Edm.String" IsBindable="true">
1056310567
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
1056410568
</FunctionImport>
@@ -10595,17 +10599,30 @@
1059510599
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
1059610600
<Parameter Name="lockRequestor" Type="Edm.String"/>
1059710601
</FunctionImport>
10602+
<FunctionImport Name="LockSite" ReturnType="Edm.Int32" IsBindable="true">
10603+
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
10604+
</FunctionImport>
10605+
<FunctionImport Name="PauseCrawling" IsBindable="true">
10606+
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
10607+
</FunctionImport>
1059810608
<FunctionImport Name="ProcessStorageMetricsChanges" IsBindable="true">
1059910609
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
1060010610
</FunctionImport>
1060110611
<FunctionImport Name="ReleaseSystemSiteLock" ReturnType="Edm.Int32" IsBindable="true">
1060210612
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
1060310613
<Parameter Name="lockRequestor" Type="Edm.String"/>
1060410614
</FunctionImport>
10615+
<FunctionImport Name="ResumeCrawling" IsBindable="true">
10616+
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
10617+
</FunctionImport>
1060510618
<FunctionImport Name="SourceCleanupAfterMove" IsBindable="true">
1060610619
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
1060710620
<Parameter Name="isDeleted" Type="Edm.Boolean" Nullable="false"/>
1060810621
</FunctionImport>
10622+
<FunctionImport Name="UnlockSiteOnFailure" IsBindable="true">
10623+
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"/>
10624+
<Parameter Name="originalLockFlags" Type="Edm.Int32" Nullable="false"/>
10625+
</FunctionImport>
1060910626
<FunctionImport Name="Microsoft_SharePoint_Administration_SiteMove_Service_SiteRelocationJobManagementService" ReturnType="Microsoft.SharePoint.Administration.SiteMove.Service.SiteRelocationJobManagementService" IsComposable="true" EntitySet="SiteRelocationJobManagementServices"/>
1061010627
<FunctionImport Name="EnqueueSiteRelocationJob" IsBindable="true">
1061110628
<Parameter Name="this" Type="Microsoft.SharePoint.Administration.SiteMove.Service.SiteRelocationJobManagementService"/>
@@ -16769,6 +16786,10 @@
1676916786
<Parameter Name="this" Type="Microsoft.Online.SharePoint.TenantAdministration.SPDataGovernanceInsightRestApiClient"/>
1677016787
<Parameter Name="reportId" Type="Edm.Guid" Nullable="false"/>
1677116788
</FunctionImport>
16789+
<FunctionImport Name="GetSPODataAccessGovernanceInsightV2" ReturnType="Collection(Microsoft.Online.SharePoint.TenantAdministration.SPDataGovernanceInsightResponse)" IsBindable="true">
16790+
<Parameter Name="this" Type="Microsoft.Online.SharePoint.TenantAdministration.SPDataGovernanceInsightRestApiClient"/>
16791+
<Parameter Name="reportEntity" Type="Edm.Int32" Nullable="false"/>
16792+
</FunctionImport>
1677216793
<FunctionImport Name="RemoveDataAccessGovernanceReport" IsBindable="true">
1677316794
<Parameter Name="this" Type="Microsoft.Online.SharePoint.TenantAdministration.SPDataGovernanceInsightRestApiClient"/>
1677416795
<Parameter Name="reportId" Type="Edm.Guid" Nullable="false"/>
@@ -16977,9 +16998,6 @@
1697716998
<Parameter Name="defaultOriginAdded" Type="Edm.Boolean" Nullable="false"/>
1697816999
<Parameter Name="configParam" Type="Microsoft.SharePoint.BrandCenter.OrgAssetsLibraryConfigParam"/>
1697917000
</FunctionImport>
16980-
<FunctionImport Name="AppHasAdminSitePermission" ReturnType="Edm.String" IsBindable="true">
16981-
<Parameter Name="this" Type="Microsoft.Online.SharePoint.TenantAdministration.Tenant"/>
16982-
</FunctionImport>
1698317001
<FunctionImport Name="ArchiveSiteById" ReturnType="Microsoft.Online.SharePoint.TenantAdministration.SpoOperation" IsBindable="true" EntitySet="SpoOperations">
1698417002
<Parameter Name="this" Type="Microsoft.Online.SharePoint.TenantAdministration.Tenant"/>
1698517003
<Parameter Name="siteId" Type="Edm.Guid" Nullable="false"/>
@@ -22262,6 +22280,9 @@
2226222280
<Annotations Target="SP.MediaServiceUpdateParameters/Entropy">
2226322281
<ValueAnnotation Term="Com.Microsoft.VisualStudio.CodeGen.IsBeta" Bool="true"/>
2226422282
</Annotations>
22283+
<Annotations Target="SP.MediaServiceUpdateParameters/FieldValues">
22284+
<ValueAnnotation Term="Com.Microsoft.VisualStudio.CodeGen.IsBeta" Bool="true"/>
22285+
</Annotations>
2226522286
<Annotations Target="SP.MediaServiceUpdateParameters/MachineLearningSampleMeta">
2226622287
<ValueAnnotation Term="Com.Microsoft.VisualStudio.CodeGen.IsBeta" Bool="true"/>
2226722288
</Annotations>
@@ -24324,6 +24345,9 @@
2432424345
<Annotations Target="SP.Publishing.SitePageMetadata/ContentTypeId">
2432524346
<ValueAnnotation Term="Com.Microsoft.VisualStudio.CodeGen.IsBeta" Bool="true"/>
2432624347
</Annotations>
24348+
<Annotations Target="SP.Publishing.SitePageMetadata/Created">
24349+
<ValueAnnotation Term="Com.Microsoft.VisualStudio.CodeGen.IsBeta" Bool="true"/>
24350+
</Annotations>
2432724351
<Annotations Target="SP.Publishing.UserInfo">
2432824352
<ValueAnnotation Term="Com.Microsoft.VisualStudio.CodeGen.IsBeta" Bool="true"/>
2432924353
</Annotations>
@@ -31612,7 +31636,6 @@
3161231636
<Property Name="FinishVariance" Type="Edm.String"/>
3161331637
<Property Name="FinishVarianceMilliseconds" Type="Edm.Int32" Nullable="false"/>
3161431638
<Property Name="FinishVarianceTimeSpan" Type="Edm.Time" Nullable="false"/>
31615-
<Property Name="FixedCostAccrual" Type="Edm.Int32" Nullable="false"/>
3161631639
<Property Name="FreeSlack" Type="Edm.String"/>
3161731640
<Property Name="FreeSlackMilliseconds" Type="Edm.Int32" Nullable="false"/>
3161831641
<Property Name="FreeSlackTimeSpan" Type="Edm.Time" Nullable="false"/>
@@ -31815,6 +31838,7 @@
3181531838
<Property Name="Finish" Type="Edm.DateTime" Nullable="false"/>
3181631839
<Property Name="FinishText" Type="Edm.String"/>
3181731840
<Property Name="FixedCost" Type="Edm.Double" Nullable="false"/>
31841+
<Property Name="FixedCostAccrual" Type="Edm.Int32" Nullable="false"/>
3181831842
<Property Name="IsActive" Type="Edm.Boolean" Nullable="false"/>
3181931843
<Property Name="IsEffortDriven" Type="Edm.Boolean" Nullable="false"/>
3182031844
<Property Name="IsLockedByManager" Type="Edm.Boolean" Nullable="false"/>
@@ -31980,6 +32004,7 @@
3198032004
<Property Name="Finish" Type="Edm.DateTime" Nullable="false"/>
3198132005
<Property Name="FinishText" Type="Edm.String"/>
3198232006
<Property Name="FixedCost" Type="Edm.Double" Nullable="false"/>
32007+
<Property Name="FixedCostAccrual" Type="Edm.Int32" Nullable="false"/>
3198332008
<Property Name="IsActive" Type="Edm.Boolean" Nullable="false"/>
3198432009
<Property Name="IsEffortDriven" Type="Edm.Boolean" Nullable="false"/>
3198532010
<Property Name="IsLockedByManager" Type="Edm.Boolean" Nullable="false"/>
@@ -32039,6 +32064,7 @@
3203932064
<Property Name="DurationTimeSpan" Type="Edm.Time" Nullable="false"/>
3204032065
<Property Name="Finish" Type="Edm.DateTime" Nullable="false"/>
3204132066
<Property Name="FinishText" Type="Edm.String"/>
32067+
<Property Name="FixedCostAccrual" Type="Edm.Int32" Nullable="false"/>
3204232068
<Property Name="Name" Type="Edm.String"/>
3204332069
<Property Name="PercentComplete" Type="Edm.Int32" Nullable="false"/>
3204432070
<Property Name="Priority" Type="Edm.Int32" Nullable="false"/>
@@ -33491,6 +33517,7 @@
3349133517
<Property Name="CommentCount" Type="Edm.Int32" Nullable="false"/>
3349233518
<Property Name="CommentsDisabled" Type="Edm.Boolean" Nullable="false"/>
3349333519
<Property Name="ContentTypeId" Type="Edm.String"/>
33520+
<Property Name="Created" Type="Edm.DateTime"/>
3349433521
<Property Name="Description" Type="Edm.String"/>
3349533522
<Property Name="DoesUserHaveEditPermission" Type="Edm.Boolean" Nullable="false"/>
3349633523
<Property Name="FileName" Type="Edm.String"/>
@@ -38657,6 +38684,7 @@
3865738684
<Property Name="GroupId" Type="Edm.Guid" Nullable="false"/>
3865838685
<Property Name="GroupOwnerLoginName" Type="Edm.String"/>
3865938686
<Property Name="HasHolds" Type="Edm.Boolean" Nullable="false"/>
38687+
<Property Name="HidePeoplePreviewingFiles" Type="Edm.Boolean" Nullable="false"/>
3866038688
<Property Name="HubSiteId" Type="Edm.Guid" Nullable="false"/>
3866138689
<Property Name="IBMode" Type="Edm.String"/>
3866238690
<Property Name="IBSegments" Type="Collection(Edm.Guid)" Nullable="false"/>
@@ -38862,6 +38890,7 @@
3886238890
<Property Name="AllowSelectSGsInODBListInTenant" Type="Collection(Edm.String)"/>
3886338891
<Property Name="AllowSensitivityLabelOnRecords" Type="Edm.Boolean" Nullable="false"/>
3886438892
<Property Name="AllowSharingOutsideRestrictedAccessControlGroups" Type="Edm.Boolean" Nullable="false"/>
38893+
<Property Name="AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled" Type="Edm.Boolean" Nullable="false"/>
3886538894
<Property Name="AmplifyAdminSettings" Type="Edm.String"/>
3886638895
<Property Name="AnyoneLinkTrackUsers" Type="Edm.Boolean" Nullable="false"/>
3886738896
<Property Name="AppBypassInformationBarriers" Type="Edm.Boolean" Nullable="false"/>
@@ -39131,6 +39160,7 @@
3913139160
<Property Name="TranslationSiteList" Type="Collection(Edm.Guid)" Nullable="false"/>
3913239161
<Property Name="TranslationSiteListFileName" Type="Edm.String"/>
3913339162
<Property Name="UniversalAnnotationDisabled" Type="Edm.Boolean" Nullable="false"/>
39163+
<Property Name="UnlicensedOdbSyntexBillingEnabled" Type="Edm.Boolean" Nullable="false"/>
3913439164
<Property Name="UnlicensedOneDriveForBusinessTenantMetricsData" Type="Microsoft.SharePoint.Administration.OdbLicenseEnforcement.UnlicensedOdbTenantMetrics"/>
3913539165
<Property Name="UseFindPeopleInPeoplePicker" Type="Edm.Boolean" Nullable="false"/>
3913639166
<Property Name="UsePersistentCookiesForExplorerView" Type="Edm.Boolean" Nullable="false"/>
@@ -40994,6 +41024,7 @@
4099441024
<Property Name="AllowSelectSecurityGroupsInSPSitesList" Type="Collection(Edm.String)"/>
4099541025
<Property Name="AllowSelectSGsInODBList" Type="Collection(Edm.String)"/>
4099641026
<Property Name="AllowSharingOutsideRestrictedAccessControlGroups" Type="Edm.Boolean" Nullable="false"/>
41027+
<Property Name="AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled" Type="Edm.Boolean" Nullable="false"/>
4099741028
<Property Name="AnyoneLinkTrackUsers" Type="Edm.Boolean" Nullable="false"/>
4099841029
<Property Name="AppBypassInformationBarriers" Type="Edm.Boolean" Nullable="false"/>
4099941030
<Property Name="ApplyAppEnforcedRestrictionsToAdHocRecipients" Type="Edm.Boolean" Nullable="false"/>

office365/sharepoint/listitems/listitem.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,7 @@ def _after_system_update(result):
320320
# type: (ClientResult[ClientValueCollection[ListItemFormUpdateValue]]) -> None
321321
has_any_error = any([item.HasException for item in result.value])
322322
if has_any_error:
323-
raise ValueError(
324-
"Update ListItem failed"
325-
)
323+
raise ValueError("Update ListItem failed")
326324

327325
def _system_update():
328326
from office365.sharepoint.fields.user_value import FieldUserValue
@@ -335,24 +333,23 @@ def _system_update():
335333
user = self.context.web.site_users.get_by_id(self.get_property(n))
336334
form_values[n[:-2]] = FieldUserValue.from_user(user)
337335
else:
338-
form_values[n] = self.get_property(n)
336+
form_values[n] = self.get_property(n)
339337

340338
self.validate_update_list_item(
341339
form_values=form_values,
342340
dates_in_utc=True,
343341
new_document_update=True,
344342
).after_execute(_after_system_update)
345343

346-
347344
def _list_loaded():
348345
if self.parent_list.base_template == 101:
349-
self.ensure_properties(sys_metadata, _system_update)
346+
self.ensure_properties(sys_metadata, _system_update)
350347
else:
351348
next_qry = ServiceOperationQuery(self, "SystemUpdate")
352349
self.context.add_query(next_qry)
353350

354351
self.parent_list.ensure_properties(["BaseTemplate"], _list_loaded)
355-
#self.ensure_properties(sys_metadata, _system_update)
352+
# self.ensure_properties(sys_metadata, _system_update)
356353
return self
357354

358355
def update_overwrite_version(self):

office365/sharepoint/tenant/administration/tenant.py

-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ def get_ransomware_events_overview(self):
385385
self.context.add_query(qry)
386386
return return_type
387387

388-
389388
def get_sp_list_item_count(self, list_name):
390389
# type: (str) -> ClientResult[int]
391390
""" """

office365/subscriptions/collection.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def add(
3939
The possible values are: v1_0, v1_1, v1_2, v1_3.
4040
:param bool include_resource_data: Indicates whether the resource data for the resource that generated the
4141
change notification should be included in the payload of the notification.
42-
:param str encryption_certificate: Specifies the public key certificate which contains only the public key
43-
that Microsoft Graph uses to encrypt the resource data it returns to your app. For security, Microsoft
44-
Graph encrypts the resource data returned in a rich notification. You must provide a public encryption
45-
key as part of creating the subscription.
42+
:param str encryption_certificate: Specifies the public key certificate which contains only the public key
43+
that Microsoft Graph uses to encrypt the resource data it returns to your app. For security, Microsoft
44+
Graph encrypts the resource data returned in a rich notification. You must provide a public encryption
45+
key as part of creating the subscription.
4646
:param str encryption_certificate_id: Specifies the identifier of the certificate used to encrypt the content
47-
of the change notification. Use this ID to match in each change notification, which certificate to use
47+
of the change notification. Use this ID to match in each change notification, which certificate to use
4848
for decryption.
4949
:return: Subscription
5050
"""

tests/sharepoint/test_tenant.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,6 @@ def test_30_get_cdn_urls(self):
211211
self.assertIsNotNone(result.value)
212212

213213
# You need a SharePoint Advanced Management license to perform this action
214-
#def test_31_get_ransomware_events_overview(self):
214+
# def test_31_get_ransomware_events_overview(self):
215215
# result = self.tenant.get_ransomware_events_overview().execute_query()
216216
# self.assertIsNotNone(result.value)

0 commit comments

Comments
 (0)