From ce829a79edb160a31ed34076d43629fb48e163a2 Mon Sep 17 00:00:00 2001 From: deepsourcebot Date: Fri, 9 Jun 2023 11:57:45 +0000 Subject: [PATCH 1/2] Remove use of debugger Debuggers should only be used temporarily and locally. It is highly recommended not to leave debug statements in checked-in code. This may cause your application to have unintended side-effects. --- foo.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/foo.py b/foo.py index 40df53dbf..6a5e473c8 100644 --- a/foo.py +++ b/foo.py @@ -5,8 +5,6 @@ a = 1 b = 2 assert a == 1 -breakpoint() -breakpoint() print(b, nums) def baz(a=[]): @@ -28,9 +26,7 @@ def bar(a): pass def boom(a=[]): - breakpoint() filename = os.tmpnam() - breakpoint() return filename def another_test_method(): From 57b1f404993fa673699a009399d81e317d610320 Mon Sep 17 00:00:00 2001 From: deepsourcebot Date: Fri, 9 Jun 2023 11:57:53 +0000 Subject: [PATCH 2/2] format code with Black and ISort This commit fixes the style issues introduced in ce829a7 according to the output from Black and ISort. Details: --- foo.py | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/foo.py b/foo.py index 6a5e473c8..0c08240f7 100644 --- a/foo.py +++ b/foo.py @@ -1,39 +1,47 @@ -import os import logging -nums = [ i for i in range(10)] +import os + +nums = [i for i in range(10)] a = 1 b = 2 assert a == 1 print(b, nums) + def baz(a=[]): - return 0 + return 0 + def aaa(a=[]): - return 1 + return 1 def foo(b=[]): - return 1 + return 1 + def bar(a): - return 1 + return 1 + import os + filename = os.tmpnam() -with open(filename, 'w') as f: - pass +with open(filename, "w") as f: + pass + def boom(a=[]): - filename = os.tmpnam() - return filename + filename = os.tmpnam() + return filename + def another_test_method(): - f = open("/tmp/.deepsource.toml", "r") - f.write("config file.") - f.close() - print('abc') - -filename = os.tmpnam() + f = open("/tmp/.deepsource.toml", "r") + f.write("config file.") + f.close() + print("abc") + +filename = os.tmpnam()