Browse Source

Tiny API tweak.

Rafał Pitoń 11 years ago
parent
commit
7c62113612
3 changed files with 5 additions and 5 deletions
  1. 3 3
      docs/developers/acls.rst
  2. 1 1
      misago/acl/algebra.py
  3. 1 1
      misago/acl/tests/test_acl_algebra.py

+ 3 - 3
docs/developers/acls.rst

@@ -37,9 +37,9 @@ This module provides utilities for summing two acls and supports three most comm
 * **greater or zero**: 42 beats 13, zero beats everything
 * **greater or zero**: 42 beats 13, zero beats everything
 
 
 
 
-.. function:: sum_acls(defaults, *acls, **permissions)
+.. function:: sum_acls(defaults, *cls, **permissions)
 
 
-This function sums ACLs provided as ``*args`` using callables accepting two arguments defined in kwargs used to compare permission values. Example usage is following::
+This function sums ACLs using callables accepting two arguments defined in kwargs used to compare permission values. Example usage is following::
 
 
     from misago.acl import algebra
     from misago.acl import algebra
 
 
@@ -76,7 +76,7 @@ This function sums ACLs provided as ``*args`` using callables accepting two argu
     }
     }
 
 
     final_acl = algebra.sum_acls(
     final_acl = algebra.sum_acls(
-        defaults, *user_acls,
+        defaults, user_acls,
         can_see=algebra.greater,
         can_see=algebra.greater,
         can_hear=algebra.greater,
         can_hear=algebra.greater,
         max_speed=algebra.greater,
         max_speed=algebra.greater,

+ 1 - 1
misago/acl/algebra.py

@@ -1,4 +1,4 @@
-def sum_acls(defaults, *acls, **permissions):
+def sum_acls(defaults, acls, **permissions):
     result_acl = {}
     result_acl = {}
 
 
     for permission, compare in permissions.items():
     for permission, compare in permissions.items():

+ 1 - 1
misago/acl/tests/test_acl_algebra.py

@@ -68,7 +68,7 @@ class SumACLTests(TestCase):
         }
         }
 
 
         acl = algebra.sum_acls(
         acl = algebra.sum_acls(
-            defaults, *test_acls,
+            defaults, test_acls,
             can_see=algebra.greater,
             can_see=algebra.greater,
             can_hear=algebra.greater,
             can_hear=algebra.greater,
             max_speed=algebra.greater,
             max_speed=algebra.greater,