Skip to content

Commit c75bfb7

Browse files
refactor: drop :no-index: for a more maintainable solution
1 parent c97a4c4 commit c75bfb7

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

openedx_authz/api/data.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ class UserData(SubjectData):
302302
def username(self) -> str:
303303
"""The username for the user (e.g., 'john_doe').
304304
305-
TODO: Temporary :no-index: to avoid duplicate object warnings from wildcard import in __init__.py
306-
307-
:no-index:
308-
309305
This is an alias for external_key that represents the username without the namespace prefix.
310306
311307
Returns:
@@ -375,22 +371,16 @@ class RoleData(AuthZData):
375371
permissions: A list of permissions assigned to the role.
376372
metadata: A dictionary of metadata assigned to the role. This can include
377373
information such as the description of the role, creation date, etc.
378-
379-
TODO: Temporary :no-index: on attributes to avoid duplicate object warnings from wildcard import in __init__.py
380374
"""
381375

382376
NAMESPACE: ClassVar[str] = "role"
383-
permissions: list[PermissionData] = None #: :no-index:
384-
metadata: RoleMetadataData = None #: :no-index:
377+
permissions: list[PermissionData] = None
378+
metadata: RoleMetadataData = None
385379

386380
@property
387381
def name(self) -> str:
388382
"""The human-readable name of the role (e.g., 'Library Admin', 'Course Instructor').
389383
390-
TODO: Temporary :no-index: to avoid duplicate object warnings from wildcard import in __init__.py
391-
392-
:no-index:
393-
394384
This property transforms the external_key into a human-readable display name
395385
by replacing underscores with spaces and capitalizing each word.
396386
@@ -409,10 +399,8 @@ class RoleAssignmentData(AuthZData):
409399
email: The email of the user.
410400
role_name: The name of the role.
411401
scope: The scope in which the role is assigned.
412-
413-
TODO: Temporary :no-index: on attributes to avoid duplicate object warnings from wildcard import in __init__.py
414402
"""
415403

416-
subject: SubjectData = None #: :no-index:
404+
subject: SubjectData = None # Needs defaults to avoid value error from attrs
417405
role: RoleData = None
418-
scope: ScopeData = None #: :no-index:
406+
scope: ScopeData = None

0 commit comments

Comments
 (0)