Last active
August 1, 2019 19:44
-
-
Save adithyabsk/34762b6f8592ad11b1b41b4ea476dee5 to your computer and use it in GitHub Desktop.
pre-commit on all files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pre-commit run --all-files | |
| # seed isort known_third_party.............................................Passed | |
| # isort....................................................................Failed | |
| # hookid: isort | |
| # | |
| # Files were modified by this hook. Additional output: | |
| # | |
| # Fixing /Users/adithyabalaji/Coding/simplecalc/simplecalc/cli.py | |
| # | |
| # black....................................................................Failed | |
| # hookid: black | |
| # | |
| # Files were modified by this hook. Additional output: | |
| # | |
| # reformatted /Users/adithyabalaji/Coding/simplecalc/simplecalc/calculator.py | |
| # All done! ✨ 🍰 ✨ | |
| # 1 file reformatted, 6 files left unchanged. | |
| # | |
| # Flake8...................................................................Failed | |
| # hookid: flake8 | |
| # | |
| # simplecalc/calculator.py:39:80: E501 line too long (97 > 79 characters) | |
| # simplecalc/calculator.py:84:5: F841 local variable 'a' is assigned to but never used | |
| pre-commit run --all-files | |
| # seed isort known_third_party.............................................Passed | |
| # isort................................................(no files to check)Skipped | |
| # black................................................(no files to check)Skipped | |
| # Flake8...............................................(no files to check)Skipped | |
| # [INFO] Restored changes from /Users/adithyabalaji/.cache/pre-commit/patch1564688384. | |
| # (tooling_example) AdithyaGP:simplecalc adithyabalaji$ pre-commit run --all-files | |
| # seed isort known_third_party.............................................Passed | |
| # isort....................................................................Passed | |
| # black....................................................................Passed | |
| # Flake8...................................................................Failed | |
| # hookid: flake8 | |
| # | |
| # simplecalc/calculator.py:19:1: D401 First line should be in imperative mood | |
| # simplecalc/calculator.py:39:80: E501 line too long (97 > 79 characters) | |
| # simplecalc/calculator.py:132:1: I101 Missing parameter(s) in Docstring: - nums | |
| # simplecalc/calculator.py:133:1: I102 Excess parameter(s) in Docstring: + n | |
| # Take a look against a golden commit (before I introduced the bugs to see the errors) | |
| git diff aab3c2e | |
| # diff --git a/simplecalc/calculator.py b/simplecalc/calculator.py | |
| # index 1fd13dd..634831a 100644 | |
| # --- a/simplecalc/calculator.py | |
| # +++ b/simplecalc/calculator.py | |
| # @@ -16,7 +16,7 @@ class CalculatorTypeError(TypeError): | |
| # | |
| # | |
| # def _convert_num(s): | |
| # - """Convert a numeric string to a number. | |
| # + """Converts a numeric string to a number. | |
| # | |
| # Args: | |
| # s (str): A number representing a string | |
| # @@ -36,8 +36,7 @@ def _check_input(inp, check_zero=False): | |
| # | |
| # Args: | |
| # inp (list): An list that is hopefully of numbers | |
| # - check_zero (bool): Whether to raise on zero being one of the later | |
| # - arguments in the list. | |
| # + check_zero (bool): Whether to raise on zero being one of the later arguments in the list. | |
| # | |
| # Returns: | |
| # inp: converted input data | |
| # @@ -131,7 +130,7 @@ def quotient(nums): | |
| # 0.041666666666666664 | |
| # | |
| # Args: | |
| # - nums (list): A list of numbers | |
| # + n (list): A list of numbers | |
| # | |
| # Returns: | |
| # int or float: The quotient | |
| # Now go into those files and make the suggested changes that flake8 is making, then run flake8 to verify | |
| flake8 | |
| # empty output | |
| pre-commit run --all-files | |
| # seed isort known_third_party.............................................Passed | |
| # isort....................................................................Passed | |
| # black....................................................................Passed | |
| # Flake8...................................................................Passed | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment