Skip to content

types: use enum for note audience#392

Merged
subzeroid merged 1 commit into
mainfrom
type-note-audience-enum
Jun 20, 2026
Merged

types: use enum for note audience#392
subzeroid merged 1 commit into
mainfrom
type-note-audience-enum

Conversation

@subzeroid

@subzeroid subzeroid commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the public Notes NoteAudience = Literal[0, 1] alias with a named IntEnum
  • require NoteAudience.MUTUAL_FOLLOWERS or NoteAudience.CLOSE_FRIENDS for create_note() and create_music_note()
  • keep Instagram payloads numeric by sending int(audience), and document the enum options

Tests

  • .venv/bin/python -m pytest tests/regression/test_notes.py tests/regression/test_public_literal_types.py -q
  • ./scripts/check-mypy-baseline.sh
  • git diff --check

@subzeroid subzeroid merged commit 9d295f0 into main Jun 20, 2026
13 checks passed
@subzeroid subzeroid deleted the type-note-audience-enum branch June 20, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant