Merged
Conversation
- Bump minimum Python version from 3.10 to 3.11 in pyproject.toml - Remove conditional Self import (now native in 3.11) - Remove `from __future__ import annotations` imports - Refactor Jinja2 templates to use unified `typedef` context object instead of individual variables (type_name, is_extensible, etc.) - Extract helper methods in EnumeratedType.from_asn1 for better readability - Update test fixtures to use template-based code generation - Replace hypothesis.assume() with .filter() for cleaner property tests - Add codespell ignore words: bitstring, ifndef - Configure pylint: max-attributes=8, max-module-lines=2000, disable W0511 Signed-off-by: Yogev Neumann <xqgex@users.noreply.github.com>
Signed-off-by: Yogev Neumann <xqgex@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request upgrades the Python tooling to Python 3.11 and refactors the Jinja2 template context to use a unified typedef object instead of individual variables.
Changes:
- Python version bumped from 3.10 to 3.11, removing legacy
from __future__ import annotationsand conditionalSelfimports - Template context refactored: all
.j2templates now receive a singletypedefparameter instead of multiple individual variables - Generator functions deleted from
tools/j2735_c_generator_*modules and moved inline into test files - Test improvements: hypothesis tests use
.filter()instead ofassume()for cleaner test generation - Configuration updates: codespell ignore words, pylint settings, GitHub workflow adjustments
Reviewed changes
Copilot reviewed 81 out of 81 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tools/pyproject.toml |
Python 3.11 upgrade, pylint config updates, codespell additions |
tools/j2735_spec_*.py |
Removed from __future__ imports, unified Self import |
tools/templates/**/*.j2 |
Refactored to use typedef context object consistently |
tools/tests/**/*.py |
Generator functions moved inline, hypothesis tests improved |
tools/j2735_c_generator_bitstring/** |
Module files deleted, functionality moved to tests |
tools/j2735_c_generator_sequence/** |
Module files deleted, functionality moved to tests |
README.md |
Simplified structure, improved clarity |
tests/unity.c |
Formatting/whitespace changes only |
.github/** |
Workflow and instructions updates |
Signed-off-by: Yogev Neumann <xqgex@users.noreply.github.com>
Signed-off-by: Yogev Neumann <xqgex@users.noreply.github.com>
Signed-off-by: Yogev Neumann <xqgex@users.noreply.github.com>
Signed-off-by: Yogev Neumann <xqgex@users.noreply.github.com>
Signed-off-by: Yogev Neumann <xqgex@users.noreply.github.com>
Signed-off-by: Yogev Neumann <xqgex@users.noreply.github.com>
Contributor
Python CI ReportCommit: Python TestsTest Output✅ All tests passed Coverage: 97%
Details (2292 statements, 61 missed)
Python Static Analysis
mypypylintflake8ruffcodespell |
Contributor
CI ReportCommit: Static Analysis
cppcheckClick to expandclang-tidyClick to expandSanitizers (ASan + UBSan)Test Output✅ No issues detected Valgrind Memory CheckTest Output✅ No memory issues detected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Upgrade to Python 3.11 and simplify template context
pyproject.tomlSelfimport (now native in 3.11)from __future__ import annotationsimportstypedefcontext objectinstead of individual variables (
type_name,is_extensible, etc.)EnumeratedType.from_asn1for better readabilityhypothesis.assume()with.filter()for cleaner property testsbitstring,ifndefmax-attributes=8,max-module-lines=2000, disableW0511Related Issue
N/A
Additional Notes
N/A
Type of Change
Checklist
make test)make check)make valgrindandmake sanitize)git commit -s