Refactor: Extract textstring instantiation to from_string#115
Conversation
- Removes textstring argument from BitVector.__init__ and set_value - Simplifies string parsing into hex - Provides class method BitVector.from_string - Updates relevant tests
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
@jules. Fix these errors from pre-commits ty.......................................................................Failed
error[unknown-argument]: Argument error[unknown-argument]: Argument Found 2 diagnostics mypy.....................................................................Failed
examples/demo.py:80: error: Unexpected keyword argument "textstring" for "BitVector"; did you mean "hexstring"? [call-arg] pyrefly check............................................................Failed
INFO Checking project configured at pyright..................................................................Failed
added 1 package, and audited 2 packages in 6s found 0 vulnerabilities |
I have updated |
- Replaces leftover usages of `textstring=` with `BitVector.from_string()` - Resolves pyright, mypy, and ty type-checking errors in CI
|
I have previously fixed these errors by using the new |
This refactors text string initialization in
BitVectorby deprecating the overloadedtextstringkwarg logic inside__init__into a dedicated factory constructor:@classmethod def from_string(cls, textstring: str).All previous testing logic and methods calling
set_value()withtextstringwere appropriately updated.PR created automatically by Jules for task 6845679604730418085 started by @schwehr