From a034e1e8c96467ad2cd0f8b33569fff694b36554 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:07:02 +0000 Subject: [PATCH] style: format code with Ruff Formatter This commit fixes the style issues introduced in 9a0d707 according to the output from Ruff Formatter. Details: None --- assignment.py | 6 +++--- demo_code.py | 4 ++-- foo.py | 42 +++++++++++++++++++++++++----------------- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/assignment.py b/assignment.py index b9fdc93b2..e1229041e 100644 --- a/assignment.py +++ b/assignment.py @@ -1,3 +1,3 @@ -(*FIRST, ) = [1, 2, 3] -(*FIRST, ) = [1, 2, 3] -*FIRST, a, b = [1, 2, 3] +(*FIRST,) = [1, 2, 3] +(*FIRST,) = [1, 2, 3] +*FIRST, a, b = [1, 2, 3] diff --git a/demo_code.py b/demo_code.py index aba08a363..275fda452 100644 --- a/demo_code.py +++ b/demo_code.py @@ -17,10 +17,10 @@ class BaseNumberGenerator: """Declare a method -- `get_number`.""" def __init__(self): - self.limits = (1, 10) + self.limits = (1, 10) def get_number(self, min_max): - raise NotImplementedError + raise NotImplementedError def smethod(): """static method-to-be""" diff --git a/foo.py b/foo.py index 40df53dbf..89fc4094f 100644 --- a/foo.py +++ b/foo.py @@ -1,6 +1,7 @@ import os import logging -nums = [ i for i in range(10)] + +nums = [i for i in range(10)] a = 1 b = 2 @@ -9,35 +10,42 @@ breakpoint() 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=[]): - breakpoint() - filename = os.tmpnam() - breakpoint() - return filename + breakpoint() + filename = os.tmpnam() + breakpoint() + 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()