Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,7 @@ Style/YodaExpression:

Performance/ChainArrayAllocation:
Enabled: false

Style/RbsInline/MissingTypeAnnotation:
Exclude:
- 'test/**/*'
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 726
# Configuration parameters: EnforcedStyle, Visibility.
# SupportedStyles: doc_style, doc_style_and_return_annotation, method_type_signature, method_type_signature_or_return_annotation
Style/RbsInline/MissingTypeAnnotation:
Enabled: false

# Offense count: 193
Style/RbsInline/UntypedInstanceVariable:
Enabled: false
2 changes: 2 additions & 0 deletions lib/gruff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#
module Gruff
# @private
# @rbs path: String
# @rbs return: String
def self.libpath(path)
File.join(__dir__, 'gruff', path) # steep:ignore
end
Expand Down
1 change: 1 addition & 0 deletions lib/gruff/accumulator_bar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
class Gruff::AccumulatorBar < Gruff::StackedBar
private

# @rbs return: void
def setup_data
raise(Gruff::IncorrectNumberOfDatasetsException) unless store.length == 1

Expand Down
2 changes: 2 additions & 0 deletions lib/gruff/area.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ class Gruff::Area < Gruff::Base

private

# @rbs return: void
def initialize_attributes
super
@sorted_drawing = true
@fill_opacity = 0.85
@stroke_width = 2.0
end

# @rbs return: void
def draw_graph
x_increment = (@graph_width / (column_count - 1)).to_f

Expand Down
5 changes: 5 additions & 0 deletions lib/gruff/bar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Gruff::Bar < Gruff::Base
# Default value is +0.9+.
#
# @rbs space_percent: Float | Integer
# @rbs return: void
def spacing_factor=(space_percent)
raise ArgumentError, 'spacing_factor must be between 0.00 and 1.00' if (space_percent < 0) || (space_percent > 1)

Expand All @@ -59,6 +60,7 @@ def spacing_factor=(space_percent)

private

# @rbs return: void
def initialize_attributes
super
@spacing_factor = 0.9
Expand All @@ -68,6 +70,7 @@ def initialize_attributes
@hide_labels = false
end

# @rbs return: void
def setup_drawing
# Labels will be centered over the left of the bar if
# there are more labels than columns. This is basically the same
Expand All @@ -92,6 +95,7 @@ def hide_bottom_label_area?
hide_labels? && @x_axis_label.nil? && @legend_at_bottom == false
end

# @rbs return: void
def setup_graph_measurements
super
return if @hide_line_markers
Expand All @@ -106,6 +110,7 @@ def setup_graph_measurements
end
end

# @rbs return: void
def draw_graph
# Setup spacing.
#
Expand Down
Loading
Loading