-
Notifications
You must be signed in to change notification settings - Fork 396
[NO-TICKET] Fix IncompatibleAssignment steep check
#5015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,7 +70,8 @@ class Error | |
|
|
||
| def initialize(duration_ext_ns:, input_truncated:) | ||
| @events = [] | ||
| @actions = @attributes = {} | ||
| @actions = {} | ||
| @attributes = {} | ||
|
Comment on lines
71
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spot on, indeed a |
||
| @duration_ns = 0 | ||
| @duration_ext_ns = duration_ext_ns | ||
| @input_truncated = !!input_truncated | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,8 @@ def build(context) | |
| # Acts as DSL for building OptionDefinitions | ||
| # @public_api | ||
| class Builder | ||
| InvalidOptionError = Class.new(StandardError) | ||
| # Steep: https://github.com/soutaro/steep/issues/1880 | ||
| InvalidOptionError = Class.new(StandardError) # steep:ignore IncompatibleAssignment | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, but will this work? |
||
|
|
||
| attr_reader \ | ||
| :helpers | ||
|
|
@@ -119,7 +120,8 @@ def apply_options!(options = {}) | |
| env_parser(&options[:env_parser]) if options.key?(:env_parser) | ||
| after_set(&options[:after_set]) if options.key?(:after_set) | ||
| resetter(&options[:resetter]) if options.key?(:resetter) | ||
| setter(&options[:setter]) if options.key?(:setter) | ||
| # Steep: https://github.com/soutaro/steep/issues/477 | ||
| setter(&options[:setter]) if options.key?(:setter) # steep:ignore BlockTypeMismatch | ||
| type(options[:type], **(options[:type_options] || {})) if options.key?(:type) | ||
| end | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ module Time | |
| # Current monotonic time | ||
| # | ||
| # @param unit [Symbol] unit for the resulting value, same as ::Process#clock_gettime, defaults to :float_second | ||
| # @return [Numeric] timestamp in the requested unit, since some unspecified starting point | ||
| # @return [Float|Integer] timestamp in the requested unit, since some unspecified starting point | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❤️ |
||
| def get_time(unit = :float_second) | ||
| Process.clock_gettime(Process::CLOCK_MONOTONIC, unit) | ||
| end | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use
class ActiveContextError < StandardErrordoes steep then work?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does but I remember that @Strech preferred to keep it as is, which is why I've added a comment with the issue, and disabled it
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think type definition as such should work, no? But code could stay the same