Skip to content

imprv: class generation, props typing, and __init__ arguments#294

Merged
bryanforbes merged 1 commit intopygobject:masterfrom
bryanforbes:imprv/class-generation
Apr 15, 2026
Merged

imprv: class generation, props typing, and __init__ arguments#294
bryanforbes merged 1 commit intopygobject:masterfrom
bryanforbes:imprv/class-generation

Conversation

@bryanforbes
Copy link
Copy Markdown
Collaborator

  • Encapsulate class information and generation logic in ClassInfo
  • Encapsulate property information logic in PropertyInfo
  • Mark Props classes as only available during type checking
  • Only include the current class's properties in Props
  • Only include writable and construct-only properties in __init__ arguments
  • Make readonly props @property in Props
  • Include the doc string for all classes that have one

- Encapsulate class information and generation logic in `ClassInfo`
- Encapsulate property information logic in `PropertyInfo`
- Mark `Props` classes as only available during type checking
- Only include the current class's properties in `Props`
- Only include writable and construct-only properties in `__init__`
  arguments
- Make readonly props `@property` in `Props`
- Include the doc string for all classes that have one
@bryanforbes bryanforbes force-pushed the imprv/class-generation branch from 0e1cc6c to 65de78f Compare April 15, 2026 23:25
@bryanforbes bryanforbes merged commit f4f15e3 into pygobject:master Apr 15, 2026
2 checks passed
@bryanforbes bryanforbes deleted the imprv/class-generation branch April 15, 2026 23:27
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