From 5132654d9fdab65185883a456088d9134f611291 Mon Sep 17 00:00:00 2001 From: Anshul Saha Date: Tue, 23 Jul 2024 19:57:39 +0530 Subject: [PATCH] pre-commit formatting issues fixed --- esi_leap/common/policy.py | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/esi_leap/common/policy.py b/esi_leap/common/policy.py index 1afe80d..35581ce 100644 --- a/esi_leap/common/policy.py +++ b/esi_leap/common/policy.py @@ -58,7 +58,7 @@ {"path": "/leases", "method": "GET"}, {"path": "/leases/{lease_ident}", "method": "GET"}, {"path": "/leases/{lease_ident}", "method": "DELETE"}, - {"path": "/leases/{lease_ident}", "method": "PATCH"} + {"path": "/leases/{lease_ident}", "method": "PATCH"}, ], ), policy.DocumentedRuleDefault( @@ -103,7 +103,7 @@ {"path": "/offers", "method": "GET"}, {"path": "/offers/{offer_ident}", "method": "GET"}, {"path": "/offers/{offer_ident}", "method": "DELETE"}, - {"path": "/offers/{offer_ident}/claim", "method": "POST"} + {"path": "/offers/{offer_ident}/claim", "method": "POST"}, ], ), policy.DocumentedRuleDefault( @@ -143,16 +143,14 @@ "esi_leap:node:node_admin", "rule:is_admin", "Complete permissions over nodes", - [ - {"path": "/nodes", "method": "GET"} - ], + [{"path": "/nodes", "method": "GET"}], ), policy.DocumentedRuleDefault( "esi_leap:node:get_all", "rule:is_admin or rule:is_owner or rule:is_lessee", "Retrieve multiple nodes", [{"path": "/nodes", "method": "GET"}], - ) + ), ] event_policies = [ @@ -160,25 +158,20 @@ "esi_leap:event:event_admin", "rule:is_admin", "Complete permissions over events", - [ - {"path": "/events", "method": "GET"} - ], + [{"path": "/events", "method": "GET"}], ), policy.DocumentedRuleDefault( "esi_leap:event:get_all", "rule:is_admin or rule:is_owner or rule:is_lessee", "Retrieve multiple events", [{"path": "/events", "method": "GET"}], - ) + ), ] + def list_rules(): policies = itertools.chain( - default_policies, - lease_policies, - offer_policies, - node_policies, - event_policies + default_policies, lease_policies, offer_policies, node_policies, event_policies ) return policies