Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PiSupply/PiJuice
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: PiSupply/PiJuice
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cleanup
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 10 commits
  • 7 files changed
  • 1 contributor

Commits on Dec 12, 2018

  1. Configuration menu
    Copy the full SHA
    41e20f4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6bc46a7 View commit details
    Browse the repository at this point in the history
  3. Fix syntax error.

    tehmoose committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    77825a9 View commit details
    Browse the repository at this point in the history
  4. Remove unnecessary assignments.

    Initializing variable X with None, then changing the value inside try-except block, when there is a return statement (and no usage of X value) inside the 'except' clause, means that the 'X = None' assignment does no effect and can be safely removed.
    tehmoose committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    ecadd06 View commit details
    Browse the repository at this point in the history
  5. Fix the usage of bool, None and index() function.

    Comparison to None should be performed with 'is' operator instead of '=='. Empty dictionaries are evaluated as False in case of comparison to boolean values.
    Checking for a boolean (or duck-typed as boolean) key in dictionary can be performed by a single .get() call.
    In case there is no such element in the sequence, .index() method raises a ValueError exception instead of returning None, so comparing the result to None is always False.
    tehmoose committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    d16191f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8477eba View commit details
    Browse the repository at this point in the history
  7. time.sleep() shouldn't cause an exception.

    Multiplying by 1 doesn't seem to be necessary, whether it's int or float.
    tehmoose committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    13e78db View commit details
    Browse the repository at this point in the history
  8. Shadowing built-in names should be avoided.

    id, function, min, max, next and type are built-in names in Python.
    Shadowing them can cause unstable and unexpected behavior.
    tehmoose committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    b1ac3fe View commit details
    Browse the repository at this point in the history
  9. Fix PEP8 warnings about spaces, indentations and line length.

    It's a large commit, but i don't think that it should be divided to separate commits.
    tehmoose committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    dbafe2d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    472b8d6 View commit details
    Browse the repository at this point in the history
Loading