From a74499801af19f43cedf94798b29fa7c73e1eeec Mon Sep 17 00:00:00 2001 From: MCLearning2 Date: Tue, 23 Jul 2019 20:34:43 +0900 Subject: [PATCH 1/2] Add minus --- .gitignore | 2 ++ Makefile | 2 +- calculator.py | 3 +++ requirements.txt | 10 +++++----- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 664efa7..a5744ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *cache* .coverage .idea + +.env \ No newline at end of file diff --git a/Makefile b/Makefile index 3c23d42..1b48145 100644 --- a/Makefile +++ b/Makefile @@ -2,5 +2,5 @@ dev: pip install -U -r requirements.txt test: - flake8 . + flake8 . --exclude .env py.test --cov=. . \ No newline at end of file diff --git a/calculator.py b/calculator.py index 0e91157..b85f83d 100644 --- a/calculator.py +++ b/calculator.py @@ -29,3 +29,6 @@ def add(self, x: float, y: float) -> float: float : The sum of two given numbers. """ return x + y + + def minus(self, x: float, y: float) -> float: + pass diff --git a/requirements.txt b/requirements.txt index 67dbbac..32af406 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -flake8 -flake8-bugbear -flake8-docstrings -pytest -pytest-cov \ No newline at end of file +flake8 == 3.7.7 +flake8-bugbear == 18.8.0 +flake8-docstrings == 1.3.0 +pytest == 4.2.0 +pytest-cov == 2.6.1 \ No newline at end of file From 7a86ce9407d5a6565b15cf26c35c89aed554404f Mon Sep 17 00:00:00 2001 From: MCLearning2 Date: Tue, 23 Jul 2019 20:55:12 +0900 Subject: [PATCH 2/2] Add doctring --- calculator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/calculator.py b/calculator.py index b85f83d..a3509b3 100644 --- a/calculator.py +++ b/calculator.py @@ -31,4 +31,5 @@ def add(self, x: float, y: float) -> float: return x + y def minus(self, x: float, y: float) -> float: + """Return the minus of two inputs." pass