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

refactor(accidental): rewrite symbol getter using explanatory variables #66

Merged

Conversation

albertms10
Copy link
Owner

No description provided.

@albertms10 albertms10 added the refactor The code needs to be refactored label Apr 23, 2023
@albertms10 albertms10 self-assigned this Apr 23, 2023
@coveralls
Copy link

coveralls commented Apr 23, 2023

Pull Request Test Coverage Report for Build 4775478348

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 4775439311: 0.0%
Covered Lines: 347
Relevant Lines: 347

💛 - Coveralls

@albertms10 albertms10 merged commit 9cd7211 into main Apr 23, 2023
@albertms10 albertms10 deleted the refactor/rewrite-accidental-symbol-explanatory-variables branch April 23, 2023 00:28
semitones.isNegative ? _doubleFlatSymbol : _doubleSharpSymbol;

final absSemitones = semitones.abs();
final singleAccidentals = accidentalSymbol * (absSemitones % 2);
Copy link
Owner Author

@albertms10 albertms10 May 16, 2023

Choose a reason for hiding this comment

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

Might be clearer:

Suggested change
final singleAccidentals = accidentalSymbol * (absSemitones % 2);
final singleAccidental = absSemitones.isOdd ? accidentalSymbol : '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor The code needs to be refactored
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants