Skip to content

Conversation

@Intuity
Copy link
Owner

@Intuity Intuity commented Dec 22, 2025

  • "Normative points" renamed to "requirements"
  • __copy__ and __deepcopy__ operators implemented
  • Type hinting fixes

@Intuity Intuity requested a review from Copilot December 22, 2025 10:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames "normative points" to "requirements" throughout the codebase and implements __copy__ and __deepcopy__ operators for Packtype definitions, along with various type hinting improvements.

  • Renamed "normative points" terminology to "requirements" for better clarity
  • Implemented __copy__ and __deepcopy__ methods in Numeric class and updated tests to use Python's standard copy module
  • Fixed type hints for return types in several methods to properly use Self and None

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/utils/test_utils_basic.py Updated copy tests to use standard copy module; added comprehensive deepcopy tests for enum, struct, union, and array types
tests/pysyntax/test_struct.py Added test for struct padding field functionality
tests/grammar/test_requirement.py Renamed test functions and updated references from "normative"/"norm" to "requirement"/"req"
pyproject.toml Bumped version from 3.1.0 to 3.1.1
packtype/utils/basic.py Simplified unpack function to use Numeric base class
packtype/types/requirement.py Renamed NormativePoint class to RequirementTag and updated docstrings
packtype/types/primitive.py Fixed return type hints for value setter and _pt_set method; added _pt_unpack classmethod
packtype/types/package.py Updated all references from _PT_NORMS to _PT_REQUIREMENTS and renamed related methods
packtype/types/numeric.py Added _pt_unpack, __copy__, and __deepcopy__ methods to Numeric class
packtype/types/enum.py Fixed return type hint for _pt_cast and added _pt_unpack method
packtype/types/base.py Removed __copy__ and __deepcopy__ methods that raised NotImplementedError
packtype/types/assembly.py Fixed padding field implementation and type hint for _pt_unpack
packtype/types/array.py Added __copy__ and __deepcopy__ methods for PackedArray
packtype/grammar/transformer.py Renamed decl_normative to decl_requirement and updated imports
packtype/grammar/packtype.lark Updated grammar from "vnorm" to "requirement" keyword and enhanced HEX regex to support underscore separators
packtype/grammar/grammar.py Updated declaration handling from DeclNormative to DeclRequirement
packtype/grammar/declarations.py Renamed DeclNormative to DeclRequirement and added priority attribute assignment

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Intuity Intuity merged commit 2994b27 into main Dec 22, 2025
5 checks passed
@Intuity Intuity deleted the intuity/updates branch December 22, 2025 10:40
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.

2 participants