Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve STIX Object Handling and Documentation with Pydantic and Type Annotations #75

Merged
merged 2 commits into from Apr 1, 2024

Conversation

Cyb3rWard0g
Copy link
Collaborator

This pull request introduces significant enhancements to the handling of STIX objects within the codebase, leveraging Pydantic models for more effective parsing and translation of STIX data. The use of Pydantic allows for structured and validated data transformation, ensuring consistency and reliability when dealing with complex STIX objects.

Key Changes:

  1. Pydantic Model Integration: Implemented Pydantic models to define the structure and validation criteria for STIX objects. This approach enables automatic parsing and validation of data, reducing errors and improving code maintainability.
  2. Enhanced Data Translation: Refined the logic for translating STIX objects to and from Pydantic models, facilitating a seamless and intuitive interaction with STIX data across different modules of the application.
  3. Type Annotations and Docstrings: Updated function signatures with type hints and enhanced docstrings to improve code readability and type checking. These enhancements contribute to better documentation, easier maintenance, and support for static type analysis tools.
  4. Documentation Improvements: Expanded and clarified function documentation, providing more context on the behavior, parameters, and return types of functions. This documentation effort makes the codebase more accessible to new contributors and aids in the understanding of complex logic.

@Cyb3rWard0g Cyb3rWard0g self-assigned this Apr 1, 2024
@Cyb3rWard0g Cyb3rWard0g merged commit 127a8eb into OTRF:master Apr 1, 2024
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.

None yet

1 participant