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 to improve readability and reduce code duplication #19

merged 4 commits into from Feb 14, 2020


Copy link

nnja commented Feb 13, 2020

I'm not sure if these types of contributions are welcome, but I introduced a new _create_label_group method to the PyBadger class to help improve code readability and reduce code duplication.

Tested on a PyBadge LC.

nnja added 4 commits Feb 13, 2020
This method can be used to reduce code duplication in several areas
of the library, and introduces common shared defaults such as black
for the font color.
@nnja nnja force-pushed the nnja:refactor_to_reduce_code_dupe branch from 4941869 to de254d0 Feb 14, 2020
@makermelissa makermelissa requested a review from adafruit/circuitpythonlibrarians Feb 14, 2020

This comment has been minimized.

Copy link

ladyada commented Feb 14, 2020

@makermelissa please review :)


This comment has been minimized.

Copy link

FoamyGuy commented Feb 14, 2020

Tested on EdgeBadge, working well. Looks good to me.

@makermelissa makermelissa self-requested a review Feb 14, 2020
Copy link

makermelissa left a comment

Code looks great! Thanks for doing this. Tested on PyGamer, so now it's tested on everything.

@makermelissa makermelissa merged commit 9789a71 into adafruit:master Feb 14, 2020
1 check passed
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 15, 2020
Updating to 1.0.3 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS3MDL#5 from FoamyGuy/master

Updating to 5.1.1 from 5.0.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#68 from tannewt/adafruit_ble_package
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#67 from tannewt/service_data
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#66 from tannewt/multivalue_mfg

Updating to 2.3.2 from 2.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#34 from dherrada/master

Updating to 3.0.0 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Motor#37 from geekguy-wy/removing_deinits

Updating to 1.1.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#19 from nnja/refactor_to_reduce_code_dupe
  > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#18 from nnja/add_blinka_bmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.