Repository navigation
det CICS: shared helpers in a leaf cics_common.py; cics_taskcontrol cycle-free (Part of #7153) - #7249
Merged
Merged
Conversation
…o longer imports cics/gen (Part of #7153) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Comment on lines
+28
to
+40
| from gitgalaxy.tools.cobol_to_java.det.cics_common import ( # noqa: F401 -- re-exported for the mixins' old importers | ||
| _SEND_CONTROL, | ||
| REGION_PAGE, | ||
| CicsError, | ||
| KeylengthInvreq, | ||
| _arg, | ||
| _msg, | ||
| _one_of, | ||
| _option, | ||
| _requires, | ||
| jstr, | ||
| region_page, | ||
| ) |
| from gitgalaxy.standards.cics.commands.terminal import SEND_CONTROL_OPTIONS | ||
| from gitgalaxy.standards.cics.model import GroupKind | ||
|
|
||
| _SEND_CONTROL = frozenset(SEND_CONTROL_OPTIONS) # #4413: its device controls |
| try: | ||
| if " ".encode(declared) == b"\x40": | ||
| page = declared | ||
| except (LookupError, UnicodeError): |
Contributor
Contributor
|
No description provided. |
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.
Part of #7153. Next slice after #7239 / #7231: the
py/cyclic-importalerts (79 open onmain), starting with the det CICS mixin cycle.Class
py/cyclic-import: a det CICS mixin (cics_taskcontrol, ...) imports shared helpers (CicsError,_arg,_msg,G_jstr, ...) back fromdet/cics.pyinside its methods, andG_jstrimportsdet/gen.py, which importscics.py. CodeQL counts function-level imports, so every method import was an alert (11 incics_taskcontrol.py, plus thecics.pyline importing it).Change
det/cics_common.py:CicsError,KeylengthInvreq,region_page,_msg,_requires,_arg,_option,_one_of,_SEND_CONTROL,jstr(moved verbatim). It imports onlygitgalaxy.standards.cics.pyre-exports them (G_jstr = jstr), so every existing importer is unchanged;gen.pyimportsjstrfrom the leaf.cics_taskcontrol.pytakes its helpers fromcics_common.test_cics_spec.pygets an AST check thatcics_common/cics_taskcontrolimport neitherdet.cicsnordet.gen(any depth), andcics_commonjoins the spec-importer list.Sibling gaps (same mechanism, not here: 5-file cap)
cics_filecontrol,cics_conditions,cics_containers,cics_faultsmixins: same fix (import fromcics_common). No burned-estate program needs them; alert cleanup only.dli.py,dyncall.py,gen.py<->cics.py/dli/dyncallcycles (needsUntranslatablein a leaf).tests/tools/equivalence*anddoom_speedruncycles.Remaining slices
Untranslatableleaf for dli/dyncall/gen. 3. tests/tools cycles.Facts checked:
test_cics_spec,test_cics_family_split,test_det_translatepass; 4193 tests intests/cobol_mainframe+tests/cics_crucible(-k "det or cics") pass;audit_check.pyall clear. CodeQL itself was not run locally (it runs onmaindaily); the AST test stands in.🤖 Generated with Claude Code