Skip to content

fix: _from_vrs handle kwargs without error - #635

Merged
jsstevenson merged 1 commit into
mainfrom
tlr-vrs-interface
May 24, 2026
Merged

jsstevenson merged 1 commit into
mainfrom
tlr-vrs-interface

Conversation

@jsstevenson

@jsstevenson jsstevenson commented May 23, 2026 •

Copy link
Copy Markdown
Contributor

the root cause of biocommons/anyvar#467

If you have a valid variant expression, you can attach some extra kwargs like "assembly_name" to help ground certain kinds of translation. However, if you happen to have an invalid expression, the translator will attempt each different format of translation, including _from_vrs. If you have attached kwargs, _from_vrs will raise an unexpected TypeError because it, unlike the other _from_ methods, doesn't include kwargs in its type signature. I can't think of a reason why this might be the case. I also added a test to show this.

@jsstevenson
jsstevenson merged commit a50b9fb into main May 24, 2026
16 checks passed
@jsstevenson
jsstevenson deleted the tlr-vrs-interface branch May 24, 2026 17:28
@jsstevenson
jsstevenson restored the tlr-vrs-interface branch May 26, 2026 14:35
theferrit32 added a commit to theferrit32/vrs-python that referenced this pull request Oct 28, 2026
Forward-merge main into vrs/2.1 so it is no longer behind. Net change to
vrs/2.1 is ga4gh#642 (is_intronic r. fix); the other main commits since the merge
base (ga4gh#635, ga4gh#639, ga4gh#645, ga4gh#648) were already ported as parallel PRs.

Conflict resolution:
- src/ga4gh/core/models.py: conflict between ga4gh#645 (main) and vrs/2.1's
  restructured models (ga4gh#644 + gkm-core updates). Took vrs/2.1's version, which
  already includes the int Extension.value fix.
- src/ga4gh/core/__init__.py: auto-merged without conflict but incorrectly,
  duplicating main's __version__ block (undefined `version`) and
  CORE_VERSION = "1.0.0" from ga4gh#648. Took vrs/2.1's version (CORE_VERSION from
  ga4gh.core.version, 1.3.0).
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