Skip to content

Fix spurious columns_created in get() result and reduce cyclomatic complexity#3

Merged
maksii merged 2 commits intofeature/metadatafrom
copilot/sub-pr-2
Feb 28, 2026
Merged

Fix spurious columns_created in get() result and reduce cyclomatic complexity#3
maksii merged 2 commits intofeature/metadatafrom
copilot/sub-pr-2

Conversation

Copy link

Copilot AI commented Feb 28, 2026

The extended get() path on TableOperations incorrectly included "columns_created": [] in its return value — a field that belongs only on create responses. The method also exceeded the project's max-complexity = 10 flake8 limit (complexity 11).

Changes

  • Remove columns_created from extended get() result — the key was a copy-paste artifact from _get_table_info; it has no meaning on a metadata read response
  • Reduce get() cyclomatic complexity 11 → ≤10 — replaced the three individual if "XRelationships" in raw blocks with a single loop over a (raw_key, result_key) tuple mapping
  • Add regression guardassertNotIn("columns_created", result) added to test_get_with_include_columns

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: maksii <1761348+maksii@users.noreply.github.com>
Copilot AI changed the title [WIP] Add extended table metadata retrieval and models for columns and option sets Fix spurious columns_created in get() result and reduce cyclomatic complexity Feb 28, 2026
@maksii maksii marked this pull request as ready for review February 28, 2026 12:33
@maksii maksii merged commit 119ec8f into feature/metadata Feb 28, 2026
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