Skip to content

Commit 2630996

Browse files
committed
added lint and format format
1 parent 7a81f55 commit 2630996

File tree

6 files changed

+25
-2
lines changed

6 files changed

+25
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ install:
55

66
format:
77
#format the code
8-
8+
black *.py mylib/*.py
99
lint:
1010
#py lint
11+
pylint --disable=R,C *.py mylib/*.py
1112

1213
deploy:
1314
#deploy

Readme.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ SWE Project :
88
99
> Makefile is to automate the commands. It is used in SWE projets.
1010
11-
17/13
11+
17/03
1212
> packages installed = wikipedia, pytest, pytest-cov(give result how many codes we are covered),pylint, black (code formating tool), fire.
1313
1414
> install all package through make file 'make install'. Specifying each package with version number( to make sure project run after 2 years also) 'pip freeze | less'
1515
1616
> created a Automatic work flow using Github actions. When a commit happen in this file CI with automatically trigger. Created a status badge and pasted on readme file.
1717
18+
18/03
19+
> format code before pushing to production. To avoid formatting error.
20+
21+
> lint is used to find bad code, that tipically throw error in future development. So, using lint can be helpfull.
22+
23+
24+
25+
26+
27+

main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from mylib.script import wiki
2+
3+
result = wiki()
4+
result = result
5+
6+
print(result)
155 Bytes
Binary file not shown.
398 Bytes
Binary file not shown.

mylib/script.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import wikipedia
2+
3+
4+
def wiki(name="War Goddess", length=1):
5+
my_wiki = wikipedia.summary(name, length)
6+
return my_wiki

0 commit comments

Comments
 (0)