From 2d7d408672b60492b9df10580408da013453acef Mon Sep 17 00:00:00 2001 From: Sourya Vatsyayan Date: Wed, 9 Oct 2024 17:03:01 +0530 Subject: [PATCH 1/4] Update assignment.py --- assignment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assignment.py b/assignment.py index 78465a842..377c314d9 100644 --- a/assignment.py +++ b/assignment.py @@ -1,7 +1,7 @@ import this import that -*FIRST = [1, 2, 3] +*FIRST = [1, 2, 3, 4] (*FIRST,) = [1, 2, 3] *FIRST, a, b = [1, 2, 3, 5] From fdc415328d02071bf4464d1cb81e81a20ee93326 Mon Sep 17 00:00:00 2001 From: Sourya Vatsyayan Date: Wed, 9 Oct 2024 17:04:30 +0530 Subject: [PATCH 2/4] Update demo_code.py --- demo_code.py | 1 - 1 file changed, 1 deletion(-) diff --git a/demo_code.py b/demo_code.py index 1e336515f..c2244f353 100644 --- a/demo_code.py +++ b/demo_code.py @@ -4,7 +4,6 @@ import os import subprocess import ssl -import nothing # from django.db.models.expressions import RawSQL From c592ca670bb51d89cac5e12035750c45327ce1c0 Mon Sep 17 00:00:00 2001 From: Sourya Vatsyayan Date: Wed, 9 Oct 2024 17:09:58 +0530 Subject: [PATCH 3/4] Update .deepsource.toml --- .deepsource.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.deepsource.toml b/.deepsource.toml index 0ac63d336..f841f41ac 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -4,4 +4,7 @@ version = 1 name = "python" [analyzers.meta] - runtime_version = "3.x.x" \ No newline at end of file + runtime_version = "3.x.x" + +[[analyzers]] +name = "test-coverage" From 6c93166af6b8af1d0d64c3ab2bdef97b61c711dd Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 06:55:30 +0000 Subject: [PATCH 4/4] style: format code with Black This commit fixes the style issues introduced in 1c84d71 according to the output from Black. Details: https://github.com/sourya-deepsource/demo-python/pull/39 --- demo_code.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/demo_code.py b/demo_code.py index c2244f353..f431fe7e9 100644 --- a/demo_code.py +++ b/demo_code.py @@ -9,6 +9,7 @@ AWS_SECRET_KEY = "d6s$f9g!j8mg7hw?n&2" + class BaseNumberGenerator: """Declare a method -- `get_number`.""" @@ -34,7 +35,7 @@ class RandomNumberGenerator: def limits(self): return self.limits - + def _test(self): return self.limits @@ -46,6 +47,7 @@ def get_number(self, min_max=[1, 10]): class ImaginaryNumber: """Class to represent an imaginary number.""" + def __init__(self): self.real = 0 self.imaginary = 1 @@ -130,11 +132,13 @@ def chained_comparison(): c = 3 return a < b and b < c + def wrong_callable(): number = ImaginaryNumber() - if hasattr(number, '__call__'): + if hasattr(number, "__call__"): return number() + if __name__ == "__main__": args = ["--disable", "all"] for i in range(len(args)):