From dbcbbcfc6f48a8341effd03bbb8e9c9edc45b1c3 Mon Sep 17 00:00:00 2001 From: Shubham Londhe Date: Sun, 8 Sep 2024 11:49:49 +0530 Subject: [PATCH 1/8] Create pylint.yml --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..c73e032 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') From a01ebd32a6d3f7e0c598f34e7b6449471897b7ce Mon Sep 17 00:00:00 2001 From: LondheShubham153 Date: Sun, 8 Sep 2024 11:25:36 +0530 Subject: [PATCH 2/8] added code --- demo.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 demo.py diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..c87e1a3 --- /dev/null +++ b/demo.py @@ -0,0 +1,7 @@ +def my_function(): + a = 5 + b = 6 + + return d + +my_function() \ No newline at end of file From 58fb6a5bb09af49e08a8bff27481ee1ffcfeefd8 Mon Sep 17 00:00:00 2001 From: LondheShubham153 Date: Sun, 8 Sep 2024 11:33:10 +0530 Subject: [PATCH 3/8] added sundar sundar code --- demo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo.py b/demo.py index c87e1a3..b18e8d1 100644 --- a/demo.py +++ b/demo.py @@ -1,7 +1,7 @@ def my_function(): + a = 5 - b = 6 + return a - return d -my_function() \ No newline at end of file +my_function() From 281adb76a5e65ba964371503eb63ec13de315d47 Mon Sep 17 00:00:00 2001 From: LondheShubham153 Date: Sun, 8 Sep 2024 11:39:35 +0530 Subject: [PATCH 4/8] added something --- demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo.py b/demo.py index b18e8d1..6a16b35 100644 --- a/demo.py +++ b/demo.py @@ -1,7 +1,7 @@ def my_function(): a = 5 - return a + return a my_function() From 24395d4b45eee377ffa93991a7e36c4daab9c553 Mon Sep 17 00:00:00 2001 From: LondheShubham153 Date: Sun, 8 Sep 2024 11:51:45 +0530 Subject: [PATCH 5/8] added test --- testing.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testing.py b/testing.py index 94febcd..5b59b37 100644 --- a/testing.py +++ b/testing.py @@ -1 +1,8 @@ -print("Hello Dosto") \ No newline at end of file +def hello(): + """ + this is demo + """ + return "Hello Dosto" + + +hello() \ No newline at end of file From d621ba623c1113b630d39ab1439dd86b4c0d6db6 Mon Sep 17 00:00:00 2001 From: LondheShubham153 Date: Sun, 8 Sep 2024 11:51:59 +0530 Subject: [PATCH 6/8] added test --- testing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing.py b/testing.py index 5b59b37..8fbb1da 100644 --- a/testing.py +++ b/testing.py @@ -5,4 +5,4 @@ def hello(): return "Hello Dosto" -hello() \ No newline at end of file +hello() From cea2b06886f5dedb8e203b09c2ce53185a0ad05f Mon Sep 17 00:00:00 2001 From: Shubham Londhe Date: Sun, 8 Sep 2024 11:54:30 +0530 Subject: [PATCH 7/8] Update pylint.yml --- .github/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index c73e032..26ecd31 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.10"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} From 707e5c642bb7e3f7bd52ea8ebd9c2e7c92c0e617 Mon Sep 17 00:00:00 2001 From: LondheShubham153 Date: Sun, 8 Sep 2024 11:55:43 +0530 Subject: [PATCH 8/8] added test --- testing.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/testing.py b/testing.py index 8fbb1da..44de8b7 100644 --- a/testing.py +++ b/testing.py @@ -1,8 +1,13 @@ +""" +This module contains a simple hello function. +""" + def hello(): """ - this is demo + This function returns a greeting message. """ return "Hello Dosto" -hello() +if __name__ == "__main__": + hello()