Skip to content
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

[FIX] Scatter Plot: remove dead and commented code, tests #2627

Merged
merged 3 commits into from
Oct 2, 2017
Merged

[FIX] Scatter Plot: remove dead and commented code, tests #2627

merged 3 commits into from
Oct 2, 2017

Conversation

jerneju
Copy link
Contributor

@jerneju jerneju commented Sep 27, 2017

Issue

Dead code. Commented code. Low coverage.

Description of changes

Some code removed.
Coverage increased from 74% to 83%.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Sep 27, 2017

Codecov Report

Merging #2627 into master will increase coverage by 0.18%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2627      +/-   ##
==========================================
+ Coverage   75.17%   75.36%   +0.18%     
==========================================
  Files         331      331              
  Lines       57769    57787      +18     
==========================================
+ Hits        43429    43551     +122     
+ Misses      14340    14236     -104

@jerneju jerneju added this to the 3.6 milestone Sep 29, 2017
@astaric astaric removed this from the 3.6 milestone Sep 29, 2017
def init_attr_values(self):
domain = self.data and self.data.domain
for model in self.models:
model.set_domain(domain)
self.attr_x = self.xy_model[0] if self.xy_model else None
self.attr_y = self.xy_model[1] if len(self.xy_model) >= 2 \
else self.attr_x
self.graph.attr_color = domain and self.data.domain.class_var or None
self.graph.attr_color = self.data.domain.class_var if domain else None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous expression domain and self.data.domain.class_var or None is equivalent to self.data.domain.class_var if (domain and self.data.domain.class_var) else None, which is what I actually meant here. This is not the same as self.data.domain.class_var if domain else None, which assumes that self.data.domain.class_var is either a Variable or None (which, in fact, it is :) ). I'm just nitpicking; the previous expression was more explicit, but too unreadable.

@janezd janezd merged commit 1bf86dd into biolab:master Oct 2, 2017
@jerneju jerneju deleted the scatterplot-tests branch October 3, 2017 07:30
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.

4 participants