librus-python-api 1.11.5__tar.gz → 1.12.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/API.md +10 -1
  2. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/CHANGELOG.md +45 -0
  3. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/PKG-INFO +24 -4
  4. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/README.md +23 -3
  5. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/pyproject.toml +3 -1
  6. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/__init__.py +1 -1
  7. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/attendance_frequency.py +39 -1
  8. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/config.py +25 -1
  9. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/diagnostics.py +0 -1
  10. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/grade_records.py +1 -1
  11. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/markup.py +11 -4
  12. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/models.py +12 -0
  13. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/parsers.py +20 -7
  14. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/school_year_archive.py +34 -21
  15. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/service.py +102 -35
  16. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/.gitignore +0 -0
  17. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/LICENSE +0 -0
  18. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/SECURITY.md +0 -0
  19. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/_notification_bootstrap.py +0 -0
  20. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/_notification_codec.py +0 -0
  21. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/_storage.py +0 -0
  22. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/_windows_filesystem.py +0 -0
  23. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/announcements.py +0 -0
  24. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/attachment_routes.py +0 -0
  25. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/attachments.py +0 -0
  26. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/attendance.py +0 -0
  27. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/budget.py +0 -0
  28. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/checkpoint.py +0 -0
  29. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/class_free_days.py +0 -0
  30. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/completed_lessons.py +0 -0
  31. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/detail_fields.py +0 -0
  32. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/exceptions.py +0 -0
  33. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/files.py +0 -0
  34. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/formative_grades.py +0 -0
  35. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/gateway_grades.py +0 -0
  36. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/grade_parsers.py +0 -0
  37. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/homework_range.py +0 -0
  38. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/inspect_page.py +0 -0
  39. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/justifications.py +0 -0
  40. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/lifecycle.py +0 -0
  41. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/message_content.py +0 -0
  42. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/messages.py +0 -0
  43. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/modern_body.py +0 -0
  44. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/modern_mailbox.py +0 -0
  45. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/modern_messages.py +0 -0
  46. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/notification_models.py +0 -0
  47. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/notification_persistence.py +0 -0
  48. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/notification_workflow.py +0 -0
  49. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/notifications.py +0 -0
  50. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/parsing.py +0 -0
  51. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/persistence.py +0 -0
  52. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/py.typed +0 -0
  53. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/recipients.py +0 -0
  54. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/scheduler.py +0 -0
  55. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/school_reads.py +0 -0
  56. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/sending.py +0 -0
  57. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/timetable.py +0 -0
  58. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/src/librus_python_api/transport.py +0 -0
  59. {librus_python_api-1.11.5 → librus_python_api-1.12.1}/uv.lock +0 -0
@@ -336,6 +336,9 @@ selection or chart request. This is separate from the modern message archive.
336
336
  not asserted to equal `SubjectGradeSummary.annual`.
337
337
  - `ArchiveDescriptive(label, text)` keeps whole-year text, with explicit BR
338
338
  boundaries as newlines. Source whitespace is normalized.
339
+ - One grade row can hold marks in some years and text in others (1.12.1). Each
340
+ year lists it under `subjects` or `descriptive` by that year's cells, so a
341
+ label can appear in both families across years, never twice in one year.
339
342
  - `behaviour_first_semester` and `behaviour_second_semester_and_year_end` retain
340
343
  positional text. Populated behaviour semantics have not been observed.
341
344
  - `ArchiveAbsences(unexcused, excused, late)` contains `ArchiveCounts` with the
@@ -440,7 +443,9 @@ school's login. See [gateway descriptive grades](contracts/grades.md#gateway-des
440
443
  - `attendance_detail(detail_id)` takes a numeric string and returns ordered
441
444
  `fields`, `notes` and stable-key `normalized_fields` (see below).
442
445
  - `gateway_attendance()` returns the JSON records with a strict `AttendanceKind`
443
- per stable type ID; unknown IDs stay `UNKNOWN`. A record's `identifier` is an
446
+ per stable type ID. A type outside that policy takes the kind of the standard
447
+ type the school's type list names for it (1.12.0; the list is read only when
448
+ needed); one the list cannot map stays `UNKNOWN`. A record's `identifier` is an
444
449
  opaque token of up to 64 printable ASCII characters, not always digits
445
450
  (1.11.5); it only detects duplicate records.
446
451
  - `attendance_frequency()` returns per-semester and overall `FrequencyMeasure`
@@ -448,6 +453,10 @@ school's login. See [gateway descriptive grades](contracts/grades.md#gateway-des
448
453
  Unknown types or an empty denominator give `ratio=None`, never 100 %.
449
454
  - `subject_frequency(start=None, end=None)` resolves lessons to subjects through
450
455
  a 256-entry, one-hour metadata cache and returns one measure per subject ID.
456
+ Records whose lesson or subject Librus does not give are counted in
457
+ `unresolved` (a subject-policy `FrequencyMeasure`, `None` when all resolved)
458
+ instead of failing the read (1.12.0). When nothing resolved, the first lookup
459
+ error is raised.
451
460
 
452
461
  ## Timetable
453
462
 
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.12.1 (2026-11-30) - School-year archive rows mixing marks and text
4
+
5
+ - School-year archive: a grade row may hold three marks for one year and a
6
+ descriptive text cell for another. Such rows appeared once Synergia filled
7
+ the archive with the previous year, and every archive read on that login
8
+ failed with `UNSUPPORTED_CAPABILITY`. Each year now lists the row under
9
+ `subjects` or `descriptive` by its own cells; any other geometry is still
10
+ unsupported.
11
+ - Weekly live check: a view Synergia itself marks as unavailable for now
12
+ (`temporarily_unavailable`, such as the school-year archive while it is
13
+ filled with last year's data) is listed under Warnings and no longer fails
14
+ the run. The notice stayed up for days and failed every run although
15
+ nothing had drifted. The release profile still fails on it, since that view
16
+ was not read.
17
+
18
+ ## 1.12.0 (2026-11-24) - Attendance on schools' own types; colons in grade comments
19
+
20
+ Follow-ups to librus-mcp#136, found by comparing each check with public Librus
21
+ clients before the tester's next run:
22
+
23
+ - Attendance types: a record whose type is outside the fixed type policy was
24
+ `unknown`, which made every frequency ratio `None`. Such a type is now
25
+ resolved through the school's type list (`/gateway/api/2.0/Attendances/Types`,
26
+ new route `attendance_types`): a school's own type counts as the standard
27
+ type it names (absence, late, excused, exemption or present). The list is
28
+ read only when a record needs it, one more request; a parsed list is reused
29
+ for an hour per login, and an unusable one is read again on the next call.
30
+ When it is unavailable, those records stay `unknown` as before.
31
+ - Subject frequency: a lesson or subject that Librus does not give (an HTTP
32
+ failure, a denial or an unexpected body) failed the whole
33
+ `subject_frequency()` read. Its records are now counted in the new
34
+ `SubjectFrequencies.unresolved` measure, `None` when every record resolved.
35
+ When nothing resolved, the read fails with the first lookup's error, since
36
+ that is a failing route rather than a missing record. An exhausted budget,
37
+ an expired session, throttling, maintenance and cancellation still fail.
38
+ - Grades: a line such as `Word: text` inside a grade's comment, skill or
39
+ grading area started a field of its own, and the next plain line failed the
40
+ whole grades read with `ParseError`. A line whose label is not a Librus label
41
+ now continues the free text; a Librus label such as `Waga` still starts its
42
+ own field.
43
+ - Diagnostics: a gateway validation failure named only its first three
44
+ errors, so one field repeated on many records hid any other. Errors that
45
+ differ only in a record index are now one entry with a count, such as
46
+ `Attendances[*].Id string_pattern_mismatch x4`, up to five entries.
47
+
3
48
  ## 1.11.5 (2026-11-23) - Parent logins: attendance frequency and long grade tooltips
4
49
 
5
50
  The two failures left on a tester's parent login (librus-mcp#136):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: librus-python-api
3
- Version: 1.11.5
3
+ Version: 1.12.1
4
4
  Summary: Independent bounded async Librus Synergia client
5
5
  Project-URL: Repository, https://github.com/krzysztofbury/librus-python-api
6
6
  Project-URL: Issues, https://github.com/krzysztofbury/librus-python-api/issues
@@ -36,13 +36,23 @@ Use it in personal scripts, notification services or application backends. One
36
36
  service can manage multiple logins while keeping their sessions and data separate.
37
37
  It is not an official Librus product.
38
38
 
39
+ > **Unofficial project.** This is an independent, private open-source project.
40
+ > It is not affiliated with, endorsed by or sponsored by Librus or its owner.
41
+ > "Librus" and "Librus Synergia" are trademarks of their owner, named here only
42
+ > to say which service this software works with. See
43
+ > [Trademarks and affiliation](#trademarks-and-affiliation).
44
+
39
45
  **Requirements:** Python 3.13 or newer. Disk workflows require a trusted local
40
46
  POSIX filesystem on Linux/macOS, or a fixed local NTFS volume on Windows with
41
47
  private ACLs. Windows installations include `pywin32` and `tzdata` automatically.
42
48
  Network paths, reparse-point paths and unsafe storage permissions fail closed.
43
49
  See [platform requirements](contracts/persistence.md#windows-disk-boundary-25).
44
50
 
45
- **Status:** `1.11.5` reads gateway attendance records whose ID is not a
51
+ **Status:** `1.12.1` reads school-year archive rows that hold marks for one
52
+ year and text for another. `1.12.0` resolves a school's own attendance types, counts
53
+ attendance whose lesson or subject cannot be resolved apart instead of failing
54
+ the subject frequency read, keeps grade comment lines that hold a colon as
55
+ text and groups repeated gateway validation errors. `1.11.5` reads gateway attendance records whose ID is not a
46
56
  number and grade tooltips longer than 32 lines. `1.11.4` recovers the messages sign-in after a page that ended the
47
57
  session, reports e-Justifications switched off for a parent login as
48
58
  `ViewDisabledError`, reads descriptive grade skills that wrap onto a second
@@ -90,7 +100,7 @@ See [limitations](#supported-features-and-limitations) below.
90
100
  Install the exact release from PyPI after its gated publication completes:
91
101
 
92
102
  ```sh
93
- python -m pip install librus-python-api==1.11.5
103
+ python -m pip install librus-python-api==1.12.1
94
104
  ```
95
105
 
96
106
  Pin the exact version qualified by your application. Before publication, use a
@@ -106,7 +116,7 @@ python -m pip install .
106
116
  To install a locally built wheel instead:
107
117
 
108
118
  ```sh
109
- python -m pip install ./dist/librus_python_api-1.11.5-py3-none-any.whl
119
+ python -m pip install ./dist/librus_python_api-1.12.1-py3-none-any.whl
110
120
  ```
111
121
 
112
122
  No console script or background process is installed: import the library in your
@@ -328,6 +338,16 @@ school data to public reports.
328
338
 
329
339
  MIT licensed. See [LICENSE][license].
330
340
 
341
+ ## Trademarks and affiliation
342
+
343
+ This is an independent, private open-source project. It is not affiliated with,
344
+ endorsed by, sponsored by or otherwise connected to Librus or its owner, and it
345
+ is not an official Librus product. "Librus", "Librus Synergia" and related
346
+ names and logos are trademarks of their owner. They are used here only to
347
+ describe which service this software works with; the author claims no rights to
348
+ them. Use of the service through this software remains subject to the
349
+ service's own terms.
350
+
331
351
  [api]: https://github.com/krzysztofbury/librus-python-api/blob/main/API.md
332
352
  [upgrade]: https://github.com/krzysztofbury/librus-python-api/blob/main/contracts/account-context.md
333
353
  [verification]: https://github.com/krzysztofbury/librus-python-api/blob/main/VERIFICATION.md
@@ -10,13 +10,23 @@ Use it in personal scripts, notification services or application backends. One
10
10
  service can manage multiple logins while keeping their sessions and data separate.
11
11
  It is not an official Librus product.
12
12
 
13
+ > **Unofficial project.** This is an independent, private open-source project.
14
+ > It is not affiliated with, endorsed by or sponsored by Librus or its owner.
15
+ > "Librus" and "Librus Synergia" are trademarks of their owner, named here only
16
+ > to say which service this software works with. See
17
+ > [Trademarks and affiliation](#trademarks-and-affiliation).
18
+
13
19
  **Requirements:** Python 3.13 or newer. Disk workflows require a trusted local
14
20
  POSIX filesystem on Linux/macOS, or a fixed local NTFS volume on Windows with
15
21
  private ACLs. Windows installations include `pywin32` and `tzdata` automatically.
16
22
  Network paths, reparse-point paths and unsafe storage permissions fail closed.
17
23
  See [platform requirements](contracts/persistence.md#windows-disk-boundary-25).
18
24
 
19
- **Status:** `1.11.5` reads gateway attendance records whose ID is not a
25
+ **Status:** `1.12.1` reads school-year archive rows that hold marks for one
26
+ year and text for another. `1.12.0` resolves a school's own attendance types, counts
27
+ attendance whose lesson or subject cannot be resolved apart instead of failing
28
+ the subject frequency read, keeps grade comment lines that hold a colon as
29
+ text and groups repeated gateway validation errors. `1.11.5` reads gateway attendance records whose ID is not a
20
30
  number and grade tooltips longer than 32 lines. `1.11.4` recovers the messages sign-in after a page that ended the
21
31
  session, reports e-Justifications switched off for a parent login as
22
32
  `ViewDisabledError`, reads descriptive grade skills that wrap onto a second
@@ -64,7 +74,7 @@ See [limitations](#supported-features-and-limitations) below.
64
74
  Install the exact release from PyPI after its gated publication completes:
65
75
 
66
76
  ```sh
67
- python -m pip install librus-python-api==1.11.5
77
+ python -m pip install librus-python-api==1.12.1
68
78
  ```
69
79
 
70
80
  Pin the exact version qualified by your application. Before publication, use a
@@ -80,7 +90,7 @@ python -m pip install .
80
90
  To install a locally built wheel instead:
81
91
 
82
92
  ```sh
83
- python -m pip install ./dist/librus_python_api-1.11.5-py3-none-any.whl
93
+ python -m pip install ./dist/librus_python_api-1.12.1-py3-none-any.whl
84
94
  ```
85
95
 
86
96
  No console script or background process is installed: import the library in your
@@ -302,6 +312,16 @@ school data to public reports.
302
312
 
303
313
  MIT licensed. See [LICENSE][license].
304
314
 
315
+ ## Trademarks and affiliation
316
+
317
+ This is an independent, private open-source project. It is not affiliated with,
318
+ endorsed by, sponsored by or otherwise connected to Librus or its owner, and it
319
+ is not an official Librus product. "Librus", "Librus Synergia" and related
320
+ names and logos are trademarks of their owner. They are used here only to
321
+ describe which service this software works with; the author claims no rights to
322
+ them. Use of the service through this software remains subject to the
323
+ service's own terms.
324
+
305
325
  [api]: https://github.com/krzysztofbury/librus-python-api/blob/main/API.md
306
326
  [upgrade]: https://github.com/krzysztofbury/librus-python-api/blob/main/contracts/account-context.md
307
327
  [verification]: https://github.com/krzysztofbury/librus-python-api/blob/main/VERIFICATION.md
@@ -73,6 +73,7 @@ faulthandler_timeout = 100
73
73
  timeout = 120
74
74
  markers = [
75
75
  "performance: opt-in hardware-sensitive resource measurements",
76
+ "to_delete(issue): marked by a test audit for replacement; see the issue",
76
77
  ]
77
78
 
78
79
  [tool.ruff]
@@ -80,7 +81,8 @@ target-version = "py313"
80
81
  line-length = 88
81
82
 
82
83
  [tool.ruff.lint]
83
- select = ["E", "F", "I", "UP", "B", "ASYNC"]
84
+ # Why: shortcuts and dead code go to issues, not comments (AGENTS.md, Comments).
85
+ select = ["E", "F", "I", "UP", "B", "ASYNC", "FIX", "ERA001"]
84
86
 
85
87
  [tool.mypy]
86
88
  python_version = "3.13"
@@ -1,7 +1,7 @@
1
1
  """Independent bounded async client. General live compatibility is unqualified."""
2
2
 
3
3
  # Before the imports: config reads it for the User-Agent.
4
- __version__ = "1.11.5"
4
+ __version__ = "1.12.1"
5
5
 
6
6
  from librus_python_api.attachments import AttachmentStream, ModernAttachmentStream
7
7
  from librus_python_api.budget import RequestBudget
@@ -1,5 +1,8 @@
1
1
  """Original validated gateway parsing and explicit attendance ratio policies."""
2
2
 
3
+ from collections.abc import Mapping
4
+ from dataclasses import replace
5
+
3
6
  from pydantic import BaseModel
4
7
 
5
8
  from librus_python_api import markup
@@ -7,6 +10,8 @@ from librus_python_api.config import (
7
10
  ATTENDANCE_MAX_LESSONS,
8
11
  ATTENDANCE_MAX_RECORDS,
9
12
  ATTENDANCE_MAX_SUBJECTS,
13
+ ATTENDANCE_MAX_TYPES,
14
+ ATTENDANCE_STANDARD_TYPE_KINDS,
10
15
  ATTENDANCE_TYPE_KINDS,
11
16
  )
12
17
  from librus_python_api.exceptions import ErrorKind, LibrusError
@@ -15,6 +20,7 @@ from librus_python_api.models import (
15
20
  FrequencyMeasure,
16
21
  GatewayAttendanceRecord,
17
22
  _AttendanceEnvelopeWire,
23
+ _AttendanceTypesEnvelopeWire,
18
24
  _LessonEnvelopeWire,
19
25
  _LessonsEnvelopeWire,
20
26
  _SubjectEnvelopeWire,
@@ -82,7 +88,6 @@ def _collection[M: BaseModel](data: object, key: str, maximum: int, wire: type[M
82
88
  def _unique(pairs: list[tuple[str, str]]) -> dict[str, str]:
83
89
  result: dict[str, str] = {}
84
90
  for identifier, value in pairs:
85
- # Conflicting rows are never resolved by choosing one of them.
86
91
  if identifier in result and result[identifier] != value:
87
92
  raise LibrusError(ErrorKind.PARSE)
88
93
  result[identifier] = value
@@ -117,6 +122,39 @@ def parse_subject_names(body: bytes) -> dict[str, str]:
117
122
  )
118
123
 
119
124
 
125
+ def parse_attendance_types(body: bytes) -> dict[str, str]:
126
+ """Map a school's own attendance type IDs to the kind of their standard type.
127
+
128
+ Types without a known standard type are omitted and stay unknown.
129
+ """
130
+ envelope = _collection(
131
+ decode_json(body), "Types", ATTENDANCE_MAX_TYPES, _AttendanceTypesEnvelopeWire
132
+ )
133
+ return _unique(
134
+ [
135
+ (kind.Id, ATTENDANCE_STANDARD_TYPE_KINDS[kind.StandardType.Id])
136
+ for kind in envelope.Types
137
+ if kind.StandardType is not None
138
+ and kind.StandardType.Id in ATTENDANCE_STANDARD_TYPE_KINDS
139
+ ]
140
+ )
141
+
142
+
143
+ def resolve_type_kinds(
144
+ rows: tuple[GatewayAttendanceRecord, ...], kinds: Mapping[str, str]
145
+ ) -> tuple[GatewayAttendanceRecord, ...]:
146
+ """Rows of an unknown type take the kind `kinds` gives their type, if any.
147
+
148
+ The fixed ATTENDANCE_TYPE_KINDS policy always wins over a school's list.
149
+ """
150
+ return tuple(
151
+ replace(row, kind=AttendanceKind(kinds[row.type_id]))
152
+ if row.kind == "unknown" and row.type_id in kinds
153
+ else row
154
+ for row in rows
155
+ )
156
+
157
+
120
158
  def summarize_frequency(
121
159
  rows: tuple[GatewayAttendanceRecord, ...],
122
160
  *,
@@ -538,6 +538,17 @@ ENDPOINTS: Mapping[str, Endpoint] = MappingProxyType(
538
538
  True,
539
539
  Evidence.INDEPENDENTLY_OBSERVED,
540
540
  ),
541
+ # Read only when a record's type is outside ATTENDANCE_TYPE_KINDS.
542
+ # Shape from public client sources and a public sample (custom
543
+ # types name their standard type); not yet seen on an owner login.
544
+ Endpoint(
545
+ "attendance_types",
546
+ "GET",
547
+ "/gateway/api/2.0/Attendances/Types",
548
+ SideEffect.NONE,
549
+ True,
550
+ Evidence.SOURCE_INFORMED,
551
+ ),
541
552
  Endpoint(
542
553
  "attendance_lesson",
543
554
  "GET",
@@ -847,7 +858,6 @@ DESCRIPTIVE_IDENTIFIER = re.compile(r"[A-Za-z0-9_-]{1,128}")
847
858
  DESCRIPTIVE_IDENTIFIER_OPERATIONS = frozenset(
848
859
  {"descriptive_user_info", "descriptive_partial_grades"}
849
860
  )
850
- # The PartialGrades read is a POST whose only body is this fixed JSON object.
851
861
  DESCRIPTIVE_PARTIAL_GRADES_BODY = b"{}"
852
862
  DESCRIPTIVE_MAX_SUBJECTS = 1024
853
863
  DESCRIPTIVE_MAX_USERS = 8192
@@ -908,6 +918,7 @@ ATTENDANCE_MAX_WINDOW_DAYS = 371
908
918
  # Whole-school gateway collections resolve attendance metadata in two requests.
909
919
  ATTENDANCE_MAX_LESSONS = 4096
910
920
  ATTENDANCE_MAX_SUBJECTS = 1024
921
+ ATTENDANCE_MAX_TYPES = 1024
911
922
  # Collection recognition and detail retrieval share this central path family.
912
923
  ATTENDANCE_DETAIL_PATH_PREFIX = "/przegladaj_nb/szczegoly/"
913
924
  # Recognition only: formative detail links are classified, never requested.
@@ -1088,6 +1099,8 @@ PAGE_NOTICES = MappingProxyType(
1088
1099
  }
1089
1100
  )
1090
1101
  MODULE_UNAVAILABLE_PATH = "/modul_niedostepny"
1102
+ # Distinct field and rule pairs a wire validation failure names.
1103
+ WIRE_FAILURE_GROUPS = 5
1091
1104
  CLASS_FREE_DAYS_MAX_RECORDS = 4096
1092
1105
  # e-Justifications list (`/eusprawiedliwienia`, structure observed on two
1093
1106
  # parent logins on 2026-11-13). The list table's classes, its seven header
@@ -1667,6 +1680,17 @@ ATTENDANCE_TYPE_KINDS = MappingProxyType(
1667
1680
  "2829": "training",
1668
1681
  }
1669
1682
  )
1683
+ # A school's own attendance type names one of the standard types it counts
1684
+ # as (`StandardType`); public clients map them this way (librus-mcp#136).
1685
+ ATTENDANCE_STANDARD_TYPE_KINDS = MappingProxyType(
1686
+ {
1687
+ "1": "absence",
1688
+ "2": "late",
1689
+ "3": "excused",
1690
+ "4": "exemption",
1691
+ "100": "present",
1692
+ }
1693
+ )
1670
1694
 
1671
1695
 
1672
1696
  class _ValidatedConfig(BaseModel):
@@ -560,7 +560,6 @@ def describe_failure(error: BaseException) -> str | None:
560
560
  frame, line, elements, sequences, counts = site
561
561
  redactor = _Redactor()
562
562
  lines = [f"at {_site(frame, line)}"]
563
- # The elements nearest the failure first; a page summary last.
564
563
  for name, value in sorted(elements, key=lambda item: _is_page(item[1])):
565
564
  redactor.nodes = 0
566
565
  if _is_page(value):
@@ -767,7 +767,7 @@ def read_grade_records(document: html.HtmlElement) -> GradeRecords:
767
767
  else:
768
768
  for row in markup.rows(table):
769
769
  if markup.in_header(row):
770
- # The new-schema table's column labels, not a subject.
770
+ # Why: the header row has a subject row's shape ("Przedmiot").
771
771
  continue
772
772
  cells = markup.cells(row)
773
773
  if _descriptive_row(cells):
@@ -96,9 +96,10 @@ def tooltip_fields(
96
96
  A free-text field may span lines; an unlabelled line after it continues
97
97
  its value. Any other unlabelled line is an unknown layout. With `heading`,
98
98
  the first line is taken whole, colon included, and appended to it.
99
- `multiline` names the free-text labels (default `Komentarz`); with
100
- `unknown_multiline`, a field whose label is not a known one (teacher text
101
- holding a colon) is free text too, and inside such free text a line
99
+ `multiline` names the free-text labels (default `Komentarz`); a line
100
+ inside one whose label is no known label (teacher text holding a colon)
101
+ continues it too. With `unknown_multiline`, such a line starts a field of
102
+ its own that is free text as well, and inside free text a line
102
103
  starting with a known label is text unless the tooltip's closing run of
103
104
  known-label lines begins there. Otherwise a known label such as `Data`
104
105
  never continues. A repeatable label (`Poprawa oceny`) adds its value as
@@ -136,13 +137,19 @@ def tooltip_fields(
136
137
  )
137
138
  and (
138
139
  not separator
140
+ # Teacher text holding a colon inside a labelled free-text field
141
+ # such as `Komentarz` (librus-mcp#136): no Librus label, so text.
142
+ or (
143
+ not unknown_multiline
144
+ and last in multiline
145
+ and key not in TOOLTIP_LABELS
146
+ )
139
147
  or (unknown_multiline and index < closing and key in TOOLTIP_LABELS)
140
148
  )
141
149
  ):
142
150
  result[last] = f"{result[last]}\n{rendered}".strip()
143
151
  continue
144
152
  if separator and key in result and key in TOOLTIP_REPEATABLE_LABELS:
145
- # Each repeat keeps its value, in order, as one more line.
146
153
  result[key] = f"{result[key]}\n{value}"
147
154
  last = key
148
155
  continue
@@ -1408,6 +1408,9 @@ class SubjectFrequencies:
1408
1408
  start: date | None
1409
1409
  end: date | None
1410
1410
  observation: Observation
1411
+ # Attendance whose lesson or subject Librus could not resolve; None when
1412
+ # every record resolved.
1413
+ unresolved: FrequencyMeasure | None = None
1411
1414
 
1412
1415
 
1413
1416
  class _NumericReferenceWire(BaseModel):
@@ -1450,6 +1453,15 @@ class _AttendanceEnvelopeWire(BaseModel):
1450
1453
  Attendances: Annotated[list[_AttendanceWire], Field(max_length=2048)]
1451
1454
 
1452
1455
 
1456
+ class _AttendanceTypeWire(_NumericReferenceWire):
1457
+ StandardType: _NumericReferenceWire | None = None
1458
+
1459
+
1460
+ class _AttendanceTypesEnvelopeWire(BaseModel):
1461
+ model_config = ConfigDict(strict=True, extra="ignore", hide_input_in_errors=True)
1462
+ Types: list[_AttendanceTypeWire]
1463
+
1464
+
1453
1465
  class _LessonWire(_NumericReferenceWire):
1454
1466
  Subject: _NumericReferenceWire
1455
1467
 
@@ -18,6 +18,7 @@ from librus_python_api.config import (
18
18
  PROFILE_LABELS,
19
19
  PROFILE_LUCKY_NUMBER_CLASS,
20
20
  PROFILE_LUCKY_NUMBER_DISABLED,
21
+ WIRE_FAILURE_GROUPS,
21
22
  )
22
23
  from librus_python_api.exceptions import ErrorKind, LibrusError, ParseError
23
24
  from librus_python_api.models import (
@@ -288,20 +289,32 @@ def wire_failure(error: ValidationError, model: type[BaseModel]) -> str:
288
289
  """Where a wire model rejected a body: field path and rule, never a value.
289
290
 
290
291
  A path part is shown only when it is a list index or a field name of
291
- `model`; anything else (such as a dict key from the body) is `?`.
292
+ `model`; anything else (such as a dict key from the body) is `?`. Errors
293
+ that differ only in a list index are one entry, `[*]` with a count, so a
294
+ different field is never hidden behind repeats of the first one
295
+ (librus-mcp#136 showed three of four errors, all the same field).
292
296
  """
293
297
  names = _wire_names(model, set())
294
298
  errors = error.errors(include_url=False, include_context=False, include_input=False)
295
- shown: list[str] = []
296
- for item in errors[:3]:
297
- path = ""
299
+ groups: dict[tuple[str, str], list[str]] = {}
300
+ for item in errors:
301
+ path = pattern = ""
298
302
  for part in item["loc"]:
299
303
  if type(part) is int:
300
304
  path += f"[{part}]"
305
+ pattern += "[*]"
301
306
  else:
302
- path += ("." if path else "") + (part if part in names else "?")
303
- shown.append(f"{path or '(body)'} {item['type']}")
304
- more = f"; {len(errors)} errors" if len(errors) > 3 else ""
307
+ name = ("." if path else "") + (part if part in names else "?")
308
+ path += name
309
+ pattern += name
310
+ groups.setdefault((pattern or "(body)", item["type"]), []).append(
311
+ path or "(body)"
312
+ )
313
+ shown = [
314
+ f"{paths[0]} {rule}" if len(paths) == 1 else f"{pattern} {rule} x{len(paths)}"
315
+ for (pattern, rule), paths in list(groups.items())[:WIRE_FAILURE_GROUPS]
316
+ ]
317
+ more = f"; {len(errors)} errors" if len(groups) > WIRE_FAILURE_GROUPS else ""
305
318
  return "; ".join(shown) + more
306
319
 
307
320
 
@@ -2,8 +2,9 @@
2
2
  structural observation; every fixture is synthetic.
3
3
 
4
4
  One table holds every earlier school year: a year header row, a period row,
5
- grade rows (subject marks or full-year descriptive text), then exactly one
6
- behaviour section, one absences section and an empty footer, in that order.
5
+ grade rows (per year, three subject marks or one full-year descriptive text),
6
+ then exactly one behaviour section, one absences section and an empty footer,
7
+ in that order.
7
8
  A separate table lists achievements. Unknown layouts are unsupported;
8
9
  contradictions inside the known layout are parse errors. The student's name in
9
10
  the page header and the chart scripts are never read.
@@ -170,8 +171,8 @@ class _Body:
170
171
  self.text = text
171
172
  self.state = "grades"
172
173
  self.labels: set[str] = set()
173
- self.subjects: list[tuple[str, list[ArchiveMarks]]] = []
174
- self.descriptive: list[tuple[str, list[str]]] = []
174
+ self.subjects: list[tuple[str, dict[int, ArchiveMarks]]] = []
175
+ self.descriptive: list[tuple[str, dict[int, str]]] = []
175
176
  self.behaviour: list[tuple[str, str]] = []
176
177
  self.absences: dict[str, list[ArchiveCounts]] = {}
177
178
 
@@ -230,25 +231,33 @@ class _Body:
230
231
  label = self._label(cells)
231
232
  if not label:
232
233
  _fail(ErrorKind.UNSUPPORTED_CAPABILITY)
233
- if spans == [1] * (1 + 3 * self.count):
234
- values = self._values(cells[1:])
235
- marks = [
236
- ArchiveMarks(*values[3 * i : 3 * i + 3]) for i in range(self.count)
237
- ]
238
- self.subjects.append((label, marks))
239
- limit, size = ARCHIVE_MAX_SUBJECTS, len(self.subjects)
240
- elif spans == [1] + [3] * self.count:
241
- texts = self._values(
242
- cells[1:], multiline=True, limit=ARCHIVE_MAX_TEXT_LENGTH
243
- )
244
- self.descriptive.append((label, texts))
245
- limit, size = ARCHIVE_MAX_DESCRIPTIVE, len(self.descriptive)
246
- else:
234
+ marks: dict[int, ArchiveMarks] = {}
235
+ texts: dict[int, str] = {}
236
+ rest = list(zip(cells[1:], spans[1:], strict=True))
237
+ for year in range(self.count):
238
+ if rest and rest[0][1] == 3:
239
+ (cell, _), *rest = rest
240
+ texts[year] = self._values(
241
+ [cell], multiline=True, limit=ARCHIVE_MAX_TEXT_LENGTH
242
+ )[0]
243
+ elif [pair[1] for pair in rest[:3]] == [1, 1, 1]:
244
+ marks[year] = ArchiveMarks(*self._values([c for c, _ in rest[:3]]))
245
+ rest = rest[3:]
246
+ else:
247
+ _fail(ErrorKind.UNSUPPORTED_CAPABILITY)
248
+ if rest:
247
249
  _fail(ErrorKind.UNSUPPORTED_CAPABILITY)
248
250
  if label in self.labels:
249
251
  _fail(ErrorKind.PARSE)
250
252
  self.labels.add(label)
251
- if size > limit:
253
+ if marks:
254
+ self.subjects.append((label, marks))
255
+ if texts:
256
+ self.descriptive.append((label, texts))
257
+ if (
258
+ len(self.subjects) > ARCHIVE_MAX_SUBJECTS
259
+ or len(self.descriptive) > ARCHIVE_MAX_DESCRIPTIVE
260
+ ):
252
261
  _fail(ErrorKind.LIMIT)
253
262
 
254
263
  def _behaviour(
@@ -299,10 +308,14 @@ def _archive(table: html.HtmlElement, text: _Text) -> tuple[ArchiveYear, ...]:
299
308
  school_year=school_year,
300
309
  first_year=first_year,
301
310
  subjects=tuple(
302
- ArchiveSubject(label, marks[i]) for label, marks in body.subjects
311
+ ArchiveSubject(label, marks[i])
312
+ for label, marks in body.subjects
313
+ if i in marks
303
314
  ),
304
315
  descriptive=tuple(
305
- ArchiveDescriptive(label, texts[i]) for label, texts in body.descriptive
316
+ ArchiveDescriptive(label, texts[i])
317
+ for label, texts in body.descriptive
318
+ if i in texts
306
319
  ),
307
320
  behaviour_first_semester=body.behaviour[i][0],
308
321
  behaviour_second_semester_and_year_end=body.behaviour[i][1],
@@ -19,11 +19,13 @@ from librus_python_api.announcements import parse_announcements
19
19
  from librus_python_api.attachments import AttachmentStream, ModernAttachmentStream
20
20
  from librus_python_api.attendance import parse_attendance, parse_attendance_detail
21
21
  from librus_python_api.attendance_frequency import (
22
+ parse_attendance_types,
22
23
  parse_gateway_attendance,
23
24
  parse_lesson_subject,
24
25
  parse_lesson_subjects,
25
26
  parse_subject_name,
26
27
  parse_subject_names,
28
+ resolve_type_kinds,
27
29
  summarize_frequency,
28
30
  )
29
31
  from librus_python_api.budget import RequestBudget
@@ -438,6 +440,21 @@ _READ_STATUS: contextvars.ContextVar[list[int | None] | None] = contextvars.Cont
438
440
  _METADATA_MAP_FALLBACK = frozenset(
439
441
  {ErrorKind.ACCESS_DENIED, ErrorKind.CONNECTION, ErrorKind.LIMIT, ErrorKind.PARSE}
440
442
  )
443
+ _METADATA_MAP_PARSERS: Mapping[str, Callable[[bytes], dict[str, str]]] = (
444
+ MappingProxyType(
445
+ {
446
+ "attendance_lessons": parse_lesson_subjects,
447
+ "attendance_subjects": parse_subject_names,
448
+ "attendance_types": parse_attendance_types,
449
+ }
450
+ )
451
+ )
452
+ # A single lesson or subject Librus does not give (an HTTP failure, a denial or
453
+ # an unexpected body): its attendance is counted as unresolved instead of
454
+ # failing the whole read, as public clients do. An exhausted budget stays LIMIT.
455
+ _UNRESOLVED_REFERENCE = frozenset(
456
+ {ErrorKind.ACCESS_DENIED, ErrorKind.CONNECTION, ErrorKind.PARSE}
457
+ )
441
458
 
442
459
 
443
460
  class AccountClient:
@@ -605,7 +622,6 @@ class AccountClient:
605
622
  self, *, budget: RequestBudget | None = None, max_age_seconds: float = 0.0
606
623
  ) -> ModernIdentity:
607
624
  async def fetch(budget: RequestBudget, _: bool) -> ModernIdentity:
608
- # Identity reads are fresh even if a modern session is already bound.
609
625
  account = await self._modern_ready(budget, refresh=True)
610
626
  return ModernIdentity(
611
627
  self._session_identity(), account, self._observation("modern_identity")
@@ -1065,8 +1081,6 @@ class AccountClient:
1065
1081
  deadline=deadline,
1066
1082
  )
1067
1083
 
1068
- # Public reads: validate input, then describe one fetch for _read.
1069
-
1070
1084
  async def notification_counts(
1071
1085
  self, *, budget: RequestBudget | None = None, max_age_seconds: float = 0.0
1072
1086
  ) -> NotificationCounts:
@@ -1565,11 +1579,14 @@ class AccountClient:
1565
1579
  self, *, budget: RequestBudget | None = None, max_age_seconds: float = 0.0
1566
1580
  ) -> GatewayAttendance:
1567
1581
  async def fetch(budget: RequestBudget, _: bool) -> GatewayAttendance:
1568
- items = await self._page(
1569
- "gateway_attendance",
1582
+ items = await self._typed(
1583
+ await self._page(
1584
+ "gateway_attendance",
1585
+ budget,
1586
+ parse_gateway_attendance,
1587
+ content_type=JSON,
1588
+ ),
1570
1589
  budget,
1571
- parse_gateway_attendance,
1572
- content_type=JSON,
1573
1590
  )
1574
1591
  return GatewayAttendance(
1575
1592
  self._session_identity(),
@@ -2029,8 +2046,6 @@ class AccountClient:
2029
2046
  ("recipients", "choices", group.identifier), fetch, budget, max_age_seconds
2030
2047
  )
2031
2048
 
2032
- # Shared read machinery.
2033
-
2034
2049
  async def _school_detail(
2035
2050
  self,
2036
2051
  operation: Literal["agenda_detail", "homework_detail"],
@@ -2370,8 +2385,6 @@ class AccountClient:
2370
2385
  def _observation(self, source: str) -> Observation:
2371
2386
  return Observation(self._alias, datetime.now(UTC), self._generation, source)
2372
2387
 
2373
- # Multi-request reads.
2374
-
2375
2388
  async def _message_page(
2376
2389
  self, folder: MessageFolder, page: int, budget: RequestBudget
2377
2390
  ) -> MessagesPage:
@@ -2647,11 +2660,7 @@ class AccountClient:
2647
2660
  cached = self._metadata_maps.get(endpoint)
2648
2661
  if cached and time.monotonic() - cached[0] <= ATTENDANCE_METADATA_TTL_SECONDS:
2649
2662
  return cached[1]
2650
- parser = (
2651
- parse_lesson_subjects
2652
- if endpoint == "attendance_lessons"
2653
- else parse_subject_names
2654
- )
2663
+ parser = _METADATA_MAP_PARSERS[endpoint]
2655
2664
  try:
2656
2665
  value: Mapping[str, str] = MappingProxyType(
2657
2666
  await self._page(endpoint, budget, parser, content_type=JSON)
@@ -2676,49 +2685,107 @@ class AccountClient:
2676
2685
  "gateway_attendance", budget, parse_gateway_attendance, content_type=JSON
2677
2686
  )
2678
2687
  observed = self._observation("gateway_attendance")
2679
- rows = tuple(
2680
- r
2681
- for r in collection
2682
- if (start is None or r.day >= start) and (end is None or r.day <= end)
2688
+ rows = await self._typed(
2689
+ tuple(
2690
+ r
2691
+ for r in collection
2692
+ if (start is None or r.day >= start) and (end is None or r.day <= end)
2693
+ ),
2694
+ budget,
2683
2695
  )
2684
2696
  lessons = dict.fromkeys(row.lesson_id for row in rows)
2685
2697
  # Two collection reads keep the request count independent of how many
2686
2698
  # lessons and subjects a student has; the attendance row cap bounds
2687
- # both (#199). References absent from a collection keep the strict
2688
- # per-reference contract, one request each, so fail before spending the
2689
- # budget on lookups it cannot finish.
2699
+ # both (#199). References absent from a collection resolve one request
2700
+ # each, so fail before spending the budget on lookups it cannot finish.
2690
2701
  lesson_map = (
2691
2702
  await self._metadata_map("attendance_lessons", budget) if lessons else {}
2692
2703
  )
2693
2704
  _check_lookups(budget, self._lookups("attendance_lesson", lesson_map, lessons))
2705
+ failures: list[LibrusError] = []
2694
2706
  lesson_subjects = {
2695
2707
  lesson: lesson_map.get(lesson)
2696
- or await self._metadata_value("attendance_lesson", lesson, budget)
2708
+ or await self._reference_or_none(
2709
+ "attendance_lesson", lesson, budget, failures
2710
+ )
2697
2711
  for lesson in lessons
2698
2712
  }
2699
2713
  subjects: dict[str, list[GatewayAttendanceRecord]] = {}
2714
+ unresolved: list[GatewayAttendanceRecord] = []
2700
2715
  for row in rows:
2701
- subjects.setdefault(lesson_subjects[row.lesson_id], []).append(row)
2716
+ subject = lesson_subjects[row.lesson_id]
2717
+ if subject is None:
2718
+ unresolved.append(row)
2719
+ else:
2720
+ subjects.setdefault(subject, []).append(row)
2702
2721
  subject_map = (
2703
2722
  await self._metadata_map("attendance_subjects", budget) if subjects else {}
2704
2723
  )
2705
2724
  _check_lookups(
2706
2725
  budget, self._lookups("attendance_subject", subject_map, subjects)
2707
2726
  )
2708
- items = [
2709
- SubjectFrequency(
2710
- subject,
2711
- subject_map.get(subject)
2712
- or await self._metadata_value("attendance_subject", subject, budget),
2713
- summarize_frequency(tuple(records), subject_policy=True),
2727
+ items: list[SubjectFrequency] = []
2728
+ for subject, records in subjects.items():
2729
+ name = subject_map.get(subject) or await self._reference_or_none(
2730
+ "attendance_subject", subject, budget, failures
2731
+ )
2732
+ if name is None:
2733
+ unresolved.extend(records)
2734
+ continue
2735
+ items.append(
2736
+ SubjectFrequency(
2737
+ subject,
2738
+ name,
2739
+ summarize_frequency(tuple(records), subject_policy=True),
2740
+ )
2714
2741
  )
2715
- for subject, records in subjects.items()
2716
- ]
2742
+ if failures and not items:
2743
+ # Nothing resolved: a failing route, not a missing reference. A
2744
+ # successful all-unresolved result would hide it and be cached.
2745
+ raise failures[0]
2717
2746
  return SubjectFrequencies(
2718
- self._session_identity(), tuple(items), start, end, observed
2747
+ self._session_identity(),
2748
+ tuple(items),
2749
+ start,
2750
+ end,
2751
+ observed,
2752
+ summarize_frequency(tuple(unresolved), subject_policy=True)
2753
+ if unresolved
2754
+ else None,
2719
2755
  )
2720
2756
 
2721
- # Authentication and response validation.
2757
+ async def _reference_or_none(
2758
+ self,
2759
+ endpoint: str,
2760
+ identifier: str,
2761
+ budget: RequestBudget,
2762
+ failures: list[LibrusError],
2763
+ ) -> str | None:
2764
+ """A lesson's subject or a subject's name; None when Librus does not give
2765
+ it, with the failure appended to `failures`.
2766
+
2767
+ An expired session (401 or a login redirect), throttling, maintenance,
2768
+ deadlines, budgets and cancellation still propagate.
2769
+ """
2770
+ try:
2771
+ return await self._metadata_value(endpoint, identifier, budget)
2772
+ except LibrusError as error:
2773
+ if error.kind not in _UNRESOLVED_REFERENCE:
2774
+ raise
2775
+ failures.append(error)
2776
+ return None
2777
+
2778
+ async def _typed(
2779
+ self, rows: tuple[GatewayAttendanceRecord, ...], budget: RequestBudget
2780
+ ) -> tuple[GatewayAttendanceRecord, ...]:
2781
+ """Resolve a school's own attendance types; one read, only when needed.
2782
+
2783
+ A type list Librus cannot give leaves those rows unknown, as before.
2784
+ """
2785
+ if all(row.kind != "unknown" for row in rows):
2786
+ return rows
2787
+ kinds = await self._metadata_map("attendance_types", budget)
2788
+ return resolve_type_kinds(rows, kinds)
2722
2789
 
2723
2790
  def _validate_read_response(
2724
2791
  self, response: TransportResponse, content_type: str