coveralls: 
[![Coverage Status](https://coveralls.io/builds/27085263/badge)](https://coveralls.io/builds/27085263)

Coverage remained the same at 100.0% when pulling **661abd08d858d1a976af516f78095295cdeeec42 on Thetwam:issue/307-assignment-override-sub-objects** into **b27475309446415fa428e253c2163e0469805cf3 on ucfopen:develop**.

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 62ec157..05bcd18 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@
 ### General
 
 - Throw `IndexError` when using negative indexes on `PaginatedList` objects (Thanks, [@UniversalSuperBox](https://github.com/UniversalSuperBox))
+- `Assignment.overrides` now returns a list of `AssignmentOverride` objects.
 
 ### Deprecation Warnings
 
diff --git a/canvasapi/assignment.py b/canvasapi/assignment.py
index 3637e8f..93f413e 100644
--- a/canvasapi/assignment.py
+++ b/canvasapi/assignment.py
@@ -16,6 +16,15 @@ from canvasapi.util import combine_kwargs, obj_or_id
 
 @python_2_unicode_compatible
 class Assignment(CanvasObject):
+    def __init__(self, requester, attributes):
+        super(Assignment, self).__init__(requester, attributes)
+
+        if "overrides" in attributes:
+            self.overrides = [
+                AssignmentOverride(requester, override)
+                for override in attributes["overrides"]
+            ]
+
     def __str__(self):
         return "{} ({})".format(self.name, self.id)
 

AssignmentOverride sub-objects in Assignment
When an `Assignment` object contains an attribute `"overrides"`, parse the data as a list of `AssignmentOverride` objects, rather than a list of dicts.

This will be essentially a limited implementation of what we want to do with #56.

Keep #303 and its ramifications in mind.
diff --git a/tests/fixtures/assignment.json b/tests/fixtures/assignment.json
index 3fc2885..e457e63 100644
--- a/tests/fixtures/assignment.json
+++ b/tests/fixtures/assignment.json
@@ -255,6 +255,27 @@
 		},
 		"status_code": 200
 	},
+	"get_assignment_with_overrides": {
+		"method": "GET",
+		"endpoint": "courses/1/assignments/1",
+		"data": {
+			"id": 1,
+			"course_id": 1,
+			"name": "Assignment 1",
+			"description": "Do this assignment",
+			"overrides": [
+				{
+					"id": 1,
+					"assignment_id": 1,
+					"student_ids": [1],
+					"group_id": 1,
+					"course_section_id": 1,
+					"title": "Assignment Override 1"
+				}
+			]
+		},
+		"status_code": 200
+	},
 	"override_group_alias": {
 		"method": "GET",
 		"endpoint": "groups/1/assignments/1/override",
diff --git a/tests/test_assignment.py b/tests/test_assignment.py
index d272a92..3ddab02 100644
--- a/tests/test_assignment.py
+++ b/tests/test_assignment.py
@@ -31,6 +31,16 @@ class TestAssignment(unittest.TestCase):
             self.course = self.canvas.get_course(1)
             self.assignment = self.course.get_assignment(1)
 
+    def test__init__overrides(self, m):
+        register_uris({"assignment": ["get_assignment_with_overrides"]}, m)
+
+        assignment = self.course.get_assignment(1)
+
+        self.assertTrue(hasattr(assignment, "overrides"))
+        self.assertIsInstance(assignment.overrides, list)
+        self.assertEqual(len(assignment.overrides), 1)
+        self.assertIsInstance(assignment.overrides[0], AssignmentOverride)
+
     # create_override()
     def test_create_override(self, m):
         register_uris({"assignment": ["create_override"]}, m)

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio requests_mock
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/ucfopen/canvasapi.git@62aa3eb8045f4a5f5edeb16fafad3fdf44bff624#egg=canvasapi
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.8.0
exceptiongroup==1.2.2
execnet==2.1.1
idna==3.10
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
pytz==2025.2
requests==2.32.3
requests-mock==1.12.1
six==1.17.0
tomli==2.2.1
typing_extensions==4.13.0
urllib3==2.3.0

name: canvasapi
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - idna==3.10
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - pytz==2025.2
      - requests==2.32.3
      - requests-mock==1.12.1
      - six==1.17.0
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - urllib3==2.3.0
prefix: /opt/conda/envs/canvasapi

tests/test_assignment.py::TestAssignment::test__init__overrides
tests/test_assignment.py::TestAssignment::test__str__ tests/test_assignment.py::TestAssignment::test_create_override tests/test_assignment.py::TestAssignment::test_delete_assignments tests/test_assignment.py::TestAssignment::test_edit_assignment tests/test_assignment.py::TestAssignment::test_get_gradeable_students tests/test_assignment.py::TestAssignment::test_get_override tests/test_assignment.py::TestAssignment::test_get_overrides tests/test_assignment.py::TestAssignment::test_get_peer_reviews tests/test_assignment.py::TestAssignment::test_get_submission tests/test_assignment.py::TestAssignment::test_get_submissions tests/test_assignment.py::TestAssignment::test_set_extensions tests/test_assignment.py::TestAssignment::test_set_extensions_empty_list tests/test_assignment.py::TestAssignment::test_set_extensions_missing_key tests/test_assignment.py::TestAssignment::test_set_extensions_non_dicts tests/test_assignment.py::TestAssignment::test_set_extensions_not_list tests/test_assignment.py::TestAssignment::test_submissions_bulk_update tests/test_assignment.py::TestAssignment::test_submit tests/test_assignment.py::TestAssignment::test_submit_fail tests/test_assignment.py::TestAssignment::test_submit_file tests/test_assignment.py::TestAssignment::test_submit_file_upload_failure tests/test_assignment.py::TestAssignment::test_submit_file_wrong_type tests/test_assignment.py::TestAssignment::test_upload_to_submission_self tests/test_assignment.py::TestAssignment::test_upload_to_submission_user tests/test_assignment.py::TestAssignmentExtension::test__str__ tests/test_assignment.py::TestAssignmentGroup::test__str__ tests/test_assignment.py::TestAssignmentGroup::test_delete_assignment_group tests/test_assignment.py::TestAssignmentGroup::test_edit_assignment_group tests/test_assignment.py::TestAssignmentOverride::test__str__ tests/test_assignment.py::TestAssignmentOverride::test_delete tests/test_assignment.py::TestAssignmentOverride::test_edit
canvasapi/assignment.py CHANGELOG.md
canvasapi/assignment.py CHANGELOG.md