From 814b09bb03e7ae54d152d1257daedc74ea455a5e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:05:27 +0000 Subject: [PATCH 001/259] style: Format code with yapf and black Format code with yapf and black This commit fixes the style issues introduced in b9484de according to the output from yapf and black. Details: https://app.deepsource.one/gh/QuackatronHQ/demo-python/transform/af518a65-5f9c-405f-9244-e97b20f7a138/ --- demo_code.py | 7 +++++-- django_issues.py | 3 ++- miscellaneous.py | 13 +++++++++---- return_not_implemented.py | 30 +++++++++++++++++------------- security.py | 8 ++++++-- tests/test_code.py | 1 + type_checks.py | 3 ++- 7 files changed, 42 insertions(+), 23 deletions(-) diff --git a/demo_code.py b/demo_code.py index 68313e68b..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -5,11 +5,11 @@ import subprocess import ssl - # from django.db.models.expressions import RawSQL AWS_SECRET_KEY = "d6s$f9g!j8mg7hw?n&2" + class BaseNumberGenerator: """Declare a method -- `get_number`.""" @@ -44,6 +44,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 @@ -128,11 +129,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)): diff --git a/django_issues.py b/django_issues.py index a0d19177b..34acf9ff4 100644 --- a/django_issues.py +++ b/django_issues.py @@ -3,7 +3,8 @@ from django.http import HttpResponse from django.views.decorators.http import require_http_methods -@require_http_methods(["GET", "POST"]) # Sensitive + +@require_http_methods(["GET", "POST"]) # Sensitive def current_datetime(request): now = datetime.datetime.now() html = "It is %s." % now diff --git a/miscellaneous.py b/miscellaneous.py index a3b4fa7e6..a6ff34d5a 100644 --- a/miscellaneous.py +++ b/miscellaneous.py @@ -1,23 +1,28 @@ from utils import get_next, render_to_frontend, render_bg + class Orange: """Represents the fruit orange.""" + orange = "#FFA500" - + # Other class implementations - + def get_orange(self): return self.orange + def render(): fruit = Orange() - render_to_frontend(fruit.orange) # Rendering a color, but one can get confused with the fruit + render_to_frontend( + fruit.orange + ) # Rendering a color, but one can get confused with the fruit render_bg(fruit.get_orange) + def play_with_magic_numbers(): magic_numbers = {0, 1, 1, 2, 3, 5} for elem in magic_numbers: magic_numbers.add(get_next(elem)) return magic_numbers - diff --git a/return_not_implemented.py b/return_not_implemented.py index c9d7e580b..3d81c650f 100644 --- a/return_not_implemented.py +++ b/return_not_implemented.py @@ -1,24 +1,28 @@ class RealNumber: """Represents a real number.""" - def __init__(self, val): - self.val = val - - def __add__(self, other): + + def __init__(self, val): + self.val = val + + def __add__(self, other): raise NotImplementedError - + + class ComplexNumber: """Represents an imaginary number.""" - def __init__(self, x, y): + + def __init__(self, x, y): self.x = x - self.y = y - - def __add__(self, other): - return self.val + other.val - - def __radd__(self, other): - res = (self.x + other.val, self.y) + self.y = y + + def __add__(self, other): + return self.val + other.val + + def __radd__(self, other): + res = (self.x + other.val, self.y) return res + if __name__ == "__main__": complex_num = ComplexNumber(2, 5) real_num = RealNumber(32) diff --git a/security.py b/security.py index 1916df298..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -1,6 +1,7 @@ import sqlite3 import requests + class ResidentsDb: def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. @@ -14,16 +15,19 @@ def __init__(self, table_name, mapping_function, duration): self.cursor = None def open(self): - """ Opens connection to sqlite database.""" + """Opens connection to sqlite database.""" self.conn = sqlite3.connect(self.dbname) self.cursor = self.conn.cursor() def get_id_from_name(self, name): """Get id of resident from name.""" - data = self.cursor.execute("SELECT id FROM userdata WHERE Name ={};".format(name)) + data = self.cursor.execute( + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data + def fetch_version(request): """Fetch verison of bgmi.""" version = requests.get( diff --git a/tests/test_code.py b/tests/test_code.py index 159c78dfb..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -6,6 +6,7 @@ def test_random_number_generator(): """Test random number generator.""" assert RandomNumberGenerator().get_number() + class Tests(unittest.TestCase): def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) diff --git a/type_checks.py b/type_checks.py index 811da988f..766e84441 100644 --- a/type_checks.py +++ b/type_checks.py @@ -1,6 +1,7 @@ def greet_all(names: list[str]) -> None: for name in names: - print('Hello ' + name) + print("Hello " + name) + if __name__ == "__main__": heights = [5.5, 6, 5.9] From 5634e9faeef47b4cb8e4decca4d73fe41c321fb1 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:05:41 +0000 Subject: [PATCH 002/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 4f50a7f6c819ed270b52168e6d8570ae4dfff106 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:07:20 +0000 Subject: [PATCH 003/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5660ff612075c6584685832c1d4b71f45c01810f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:07:34 +0000 Subject: [PATCH 004/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 052f14a6b7b5eeea5baa13f085f5114bf54f1bed Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:07:47 +0000 Subject: [PATCH 005/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d19ff1ed584adc35b84e3d31006aa05e0ee01a1a Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:08:00 +0000 Subject: [PATCH 006/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5a0eb95468232681c2474612ebb320c6885692d2 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:08:14 +0000 Subject: [PATCH 007/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From f7bcbb1ef69e2581e98ea1387d3802b7dc210796 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:08:31 +0000 Subject: [PATCH 008/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From f340650ea8caceee731aea3848ca12d9eef11adf Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:08:44 +0000 Subject: [PATCH 009/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5f2d5578a8a6e5c81696387f9b844c13e2013db4 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:08:58 +0000 Subject: [PATCH 010/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2a1c0c6818b4ed3c957b87e4c469c117c71c8050 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:09:16 +0000 Subject: [PATCH 011/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b7d41368e32051e472be896f1abd594b40ae4430 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:09:30 +0000 Subject: [PATCH 012/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5365c73db1e4031acee7089d6296f9bdd44ec278 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:09:43 +0000 Subject: [PATCH 013/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d00d17738143c8aa97e650dd50b409ae1b61a035 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:09:58 +0000 Subject: [PATCH 014/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b3dc2bc1d65504e11efbc52e020539a9b31cad67 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:10:11 +0000 Subject: [PATCH 015/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ea9f5d2b284b293cb5adfd1b218c112f28497f46 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:10:25 +0000 Subject: [PATCH 016/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 1819dd75a86c7a3753190fc67cf0bd6a57cf5568 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:10:37 +0000 Subject: [PATCH 017/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c9a08fa98109199c01f8fa5f325b5f2f2d49fed4 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:10:53 +0000 Subject: [PATCH 018/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 3de2c7cb358ff7bbec008d4fe9faa812317d0ffa Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:11:06 +0000 Subject: [PATCH 019/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 4670df87f9b5fb0ba31afeff43441bef7ed9b736 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:11:19 +0000 Subject: [PATCH 020/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 3feacff8a41ac3965c63d9fb3cbaba4066f9d05d Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:11:33 +0000 Subject: [PATCH 021/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 143109785344ba39588ba611a93321a82919f747 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:11:47 +0000 Subject: [PATCH 022/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 604adc27a326eff2844a7ccd266acfb48f14e719 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:12:00 +0000 Subject: [PATCH 023/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2823b3dc954138830e7c571a34e502f04122d52b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:12:15 +0000 Subject: [PATCH 024/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 47c873997e5c651c80f8caf47eafe4b340d08822 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:12:30 +0000 Subject: [PATCH 025/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 6b6869b4c828ba3a0aa6191cc7346bfe84ddeefe Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:12:45 +0000 Subject: [PATCH 026/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 6fcd4dd3b0c695a5d14d3a8ec4e7b4a7f77bd39f Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:12:57 +0000 Subject: [PATCH 027/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From adf2db1102e606a7ddcc657e4dccce7999bab92b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:13:10 +0000 Subject: [PATCH 028/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5c0ee37c95bee7dfeab2382f27f299e5ee9db11f Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:13:24 +0000 Subject: [PATCH 029/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a0f0a396d493cb15698c05fa5ecaa8543e3ffb33 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:13:37 +0000 Subject: [PATCH 030/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 259465a8514bb68f82651b5537a66d34560dc0f4 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:13:51 +0000 Subject: [PATCH 031/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b8f0d788601fb17b415bd71db32e952c4ab7f376 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:14:05 +0000 Subject: [PATCH 032/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From fb1c0b505f3b3bc2161ff1f163a034335546decd Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:14:18 +0000 Subject: [PATCH 033/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 1c7d5d726b5b144f36f2456c232701c86d278100 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:14:30 +0000 Subject: [PATCH 034/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 3b7d6b3caf02b28027ae657f2974c1fdbf14b2c7 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:14:43 +0000 Subject: [PATCH 035/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From fe5d12ac429627694da2222e8a1f71f403dfc3ab Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:14:56 +0000 Subject: [PATCH 036/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 299021450ee9c7a04569fb2c5ddc830e8899f46b Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:15:09 +0000 Subject: [PATCH 037/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 060d91bac31b44b33777517ed8986ac0c30d5498 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:15:25 +0000 Subject: [PATCH 038/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5506a2e661c1c895ae78683111eafa58f593b467 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:15:38 +0000 Subject: [PATCH 039/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 16500226f35964ba82221a9e501c2a930903b004 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:15:52 +0000 Subject: [PATCH 040/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From aa64c11b4c9b3eace62519c822e694b12c297f5b Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:16:06 +0000 Subject: [PATCH 041/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 256aafcae061e93ff545e5d66fff84d758ea2924 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:16:19 +0000 Subject: [PATCH 042/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b6d82a491622d4ed51898f0e04244e34277edfa2 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:16:32 +0000 Subject: [PATCH 043/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b2b9142db9d13ea0d49cd9c28a7f56d98dcd9964 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:16:46 +0000 Subject: [PATCH 044/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 63cd53c00d3f812367ee803dc50eaab3d786197b Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:16:59 +0000 Subject: [PATCH 045/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 07765da1669f6c3b0ec434f7fa98911957c5263c Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:17:13 +0000 Subject: [PATCH 046/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 48a22c0b8a8c2077255fd0850f09ca9fec72e961 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:17:36 +0000 Subject: [PATCH 047/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 362b5d1acedc24611c192f171ba1bd2fe2e86165 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:17:49 +0000 Subject: [PATCH 048/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 1fa6952e2903838a5965403735f33bd2beaed204 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:18:03 +0000 Subject: [PATCH 049/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 7c32c3da8989ea634531c644c7796fa9ad566257 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:18:18 +0000 Subject: [PATCH 050/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 9780a7586f93355c32d677ecfcae3de4c862c09d Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:18:30 +0000 Subject: [PATCH 051/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 7354115d49dccb89c579f5fb258f1a1d80093826 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:18:46 +0000 Subject: [PATCH 052/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 080a5802f72665d41ab93d92739947214a4da326 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:18:59 +0000 Subject: [PATCH 053/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 52bb006e12bb93e043704f9aa633976a08d2a976 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:19:12 +0000 Subject: [PATCH 054/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 9aad9c19f07e19d2b6ef52196d27520965a04cff Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:19:26 +0000 Subject: [PATCH 055/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From afa53385c894d27e6b66d3f32929b717fd7d2c64 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:19:39 +0000 Subject: [PATCH 056/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 3b72bffa787e5806a7c08ee229a5cd83fecdd63f Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:19:53 +0000 Subject: [PATCH 057/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From be99beb7a9d90ea895d86678ac05620d9df84820 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:20:07 +0000 Subject: [PATCH 058/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 7394ef3bb9031b80eaff965b34162de3cb80cc17 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:21:16 +0000 Subject: [PATCH 059/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 7e7f22179284cdb321e53f99f6c040f28a01aab6 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:21:32 +0000 Subject: [PATCH 060/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 0520201aa539123ab0192c3a474f8f65a94760db Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:21:45 +0000 Subject: [PATCH 061/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 39000a14986f9e7c8071c7952af14dfc2cb3ab08 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:21:58 +0000 Subject: [PATCH 062/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c8b3c7f50f84c79e3746472d3a97ed00d410459f Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:22:11 +0000 Subject: [PATCH 063/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 597a7f506fedd11c599c191d29b7b08ecfe5edea Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:22:24 +0000 Subject: [PATCH 064/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 273dbd6e454e18695524e7db267a99b622212598 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:22:38 +0000 Subject: [PATCH 065/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 09142cea6ea9a8fb606c773a8cbf9d780a2db952 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:22:52 +0000 Subject: [PATCH 066/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From aaa2ffd7536a01825ff445daeb76c8de841cbb2d Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:23:05 +0000 Subject: [PATCH 067/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 92e7db5b6905edba1e1339a6d91f109bd92f9322 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:23:18 +0000 Subject: [PATCH 068/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b0954d9306838f7ca282e91d5ed56ffdf2ab93a4 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:23:32 +0000 Subject: [PATCH 069/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e0ffbe1e18584cd212561b7f37d30dee0f69c733 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:23:45 +0000 Subject: [PATCH 070/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From eff5107a0b43b817097546808df55bc9fed912d4 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:23:58 +0000 Subject: [PATCH 071/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 4c13739afad343930ffd091ff5dc7a2c6d56bc40 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:24:12 +0000 Subject: [PATCH 072/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 43625ae14af02bd1d442953fed9cf0ff0e8c1a17 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:25:02 +0000 Subject: [PATCH 073/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c5e140e77ef6dd55418fe833cd1c673c02289255 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:25:15 +0000 Subject: [PATCH 074/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 795b2bf63fd37770f83c76246a827b263642e7c9 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:25:28 +0000 Subject: [PATCH 075/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 892fa3489f119257e58598260908e6552b5a92f3 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:25:41 +0000 Subject: [PATCH 076/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 615dbdd87eedb50451ad21539105a11e6b0bcfba Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:25:55 +0000 Subject: [PATCH 077/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From faf1187949db422d771b42ec30e4338946d953c2 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:26:09 +0000 Subject: [PATCH 078/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 44490c329ce8f6d96be050d96d61b39ee43d993b Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:26:23 +0000 Subject: [PATCH 079/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From aa0c73fa7d466b48f3c38d704c653aed065da280 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:26:37 +0000 Subject: [PATCH 080/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a46a6049715d00b7aef5be98e9a2ff059a5cd1d1 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:26:51 +0000 Subject: [PATCH 081/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a905c5bb2897a5598fd9441b0e9fae71015c5fb3 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:27:05 +0000 Subject: [PATCH 082/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e26ca7b227c20c87293ed42c20bcc189705950b6 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:27:20 +0000 Subject: [PATCH 083/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 1c28100bff11ec8294cbb857add71013bc98e1dc Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:27:34 +0000 Subject: [PATCH 084/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ae01ee469f417e137d50aecba736eb4f1b06a791 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:27:47 +0000 Subject: [PATCH 085/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ac27c52e7e365a7d3a59e46f19049a7e8be64b49 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:28:01 +0000 Subject: [PATCH 086/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 40988c407027cbf246923b7c894b41ce7f2dd7ed Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:29:25 +0000 Subject: [PATCH 087/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b73cb20f62987ddcc5b86c6027ee11bc864efa18 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:29:38 +0000 Subject: [PATCH 088/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From adc8980c69928e4d5be7b1cf56e2b2eed2b3cb4e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:29:51 +0000 Subject: [PATCH 089/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 9d284de9681bab7d1501a1b553a8784e7c63c039 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:30:05 +0000 Subject: [PATCH 090/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From fda63cd7444256ef479ee78764272d743848d1ee Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:30:19 +0000 Subject: [PATCH 091/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 0718c433e8eee1404e3ea8adb50857b60ba63880 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:30:32 +0000 Subject: [PATCH 092/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 48bf136b0918196cce6de551288e1aaa8088fc34 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:47:16 +0000 Subject: [PATCH 093/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From fd0c2a124fbf184dc92a17e02938cd9daf217276 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:47:29 +0000 Subject: [PATCH 094/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From f16f66307db9ed3e8a0600de6c6ee657c5b1c3e4 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:47:44 +0000 Subject: [PATCH 095/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b3f2adbfbbed6b746e3e85a7a635f4a96493a6f8 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:47:57 +0000 Subject: [PATCH 096/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 44343522d8905963890ac5ed9aed7a2418e386da Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:48:11 +0000 Subject: [PATCH 097/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 19d6cdc14acb05d34258871b6f197d707eb8112c Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:48:24 +0000 Subject: [PATCH 098/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 24436f4922373889d9c82863b637391e0c95b6b4 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:48:38 +0000 Subject: [PATCH 099/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b944e27bda2000b398b142f27fa4c3768856e3a7 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:48:51 +0000 Subject: [PATCH 100/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 84dafca649ff545176538810b2c74a73e653b191 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:49:10 +0000 Subject: [PATCH 101/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2138d029df5a724d2b4ff171ba96d2c6dd200723 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:49:24 +0000 Subject: [PATCH 102/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 39dcd8d3ef6c0ec9034bd62a91da0206ec8e6553 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:49:39 +0000 Subject: [PATCH 103/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 4ad20b74ff5f97f5d3822160a9d90dc5db948800 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:49:53 +0000 Subject: [PATCH 104/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 1e9bad14943c343904077ab41094e0470221fdb1 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:50:07 +0000 Subject: [PATCH 105/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5119567b46a6eb2234b83a6f9cf6d22b1cbeb13c Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:50:22 +0000 Subject: [PATCH 106/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cce85192f2a473efc4bdd6b10ac4fedd5eeb205e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:50:34 +0000 Subject: [PATCH 107/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 79742274ce7808d38d3f8d6931dac5386962d280 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:50:50 +0000 Subject: [PATCH 108/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From f70a1f500e137c8103452059157d19d08cdbd5d6 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:51:04 +0000 Subject: [PATCH 109/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d80e07b80903a7d51ee6d0c27566436f71a88aed Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:51:19 +0000 Subject: [PATCH 110/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e3c19a12a66ed06d303ae51272d046b0a0c526f5 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:51:31 +0000 Subject: [PATCH 111/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 1677f23b181593d13220f3e5225f694b9f27e673 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:51:45 +0000 Subject: [PATCH 112/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 499adc07f0c26339462935feca49eab904375de0 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:51:59 +0000 Subject: [PATCH 113/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d3f82c02a178a0125334afede874bc0caa4c365e Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:52:15 +0000 Subject: [PATCH 114/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a47e215428603ee8f7571ec49528a68e8e84055d Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:52:30 +0000 Subject: [PATCH 115/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c21c6812236943ca002a27b0be5279be0ad1f2fa Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:52:43 +0000 Subject: [PATCH 116/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c84f69ecfe3309fa9314455b14ba6d0c3e048534 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:52:57 +0000 Subject: [PATCH 117/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 0f4169f88c03688ec2dd8a97570ce080db7dda39 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:53:12 +0000 Subject: [PATCH 118/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 757dfc4f1daa044091ed6e9fe2637d19c7d34c4e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:53:50 +0000 Subject: [PATCH 119/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cfaca429db47d578d3c406584830c554dd60b54b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:54:03 +0000 Subject: [PATCH 120/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 08e72bc999b4e86a7660d1f77022ffe213474268 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:54:16 +0000 Subject: [PATCH 121/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 852c817525da20792c9e5f21d3a0d7ee5bf73e4b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:54:29 +0000 Subject: [PATCH 122/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 9092e93e38668323cab18bd1f7477df724898a12 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:54:43 +0000 Subject: [PATCH 123/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cad5befa74b848d57e27c7325ef55bdfdefe0dde Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:54:56 +0000 Subject: [PATCH 124/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5e4c431c8ddfa9137e4512c8251d06d13b4dcfc4 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:55:09 +0000 Subject: [PATCH 125/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ce2c51249c20bdc2dbf7e417121ca94d87564f6f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:55:24 +0000 Subject: [PATCH 126/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2c365fa59e1e318577f9177d36cafaa47debabe0 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:55:39 +0000 Subject: [PATCH 127/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c3df92a157876ffdb64a5f5d9e0a36eb6bdc67d8 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:55:52 +0000 Subject: [PATCH 128/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c839a1c1b6add4a7721152915928e2c3e8058661 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:56:06 +0000 Subject: [PATCH 129/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From f09908d09c2b1ca885e05e13c913bbdf7b927768 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:56:21 +0000 Subject: [PATCH 130/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5f9cc7524379152c0fb7d4efd841093749e33e4f Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:56:34 +0000 Subject: [PATCH 131/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 69459dcc0fb0b4786f062e8d0b755470b32a051c Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:56:48 +0000 Subject: [PATCH 132/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e4bf8feda319ade8ab3d76a7faa0ce9c2f5f12b6 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:57:02 +0000 Subject: [PATCH 133/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 8c6a662942f07592243c5637a60624d6068c17e3 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:57:18 +0000 Subject: [PATCH 134/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 6aec8bdc0788dbb341cc26c40ea001eac5c7a511 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:57:32 +0000 Subject: [PATCH 135/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d505c12d48a6c1d1cc47db91307e173e48769b22 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:57:45 +0000 Subject: [PATCH 136/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a01ec0f9e8b0176b7b22493f75f99e9e06d1b3d9 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:57:58 +0000 Subject: [PATCH 137/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 9e65eaf480e172367e8b6cba6633d7bae49084c5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:58:14 +0000 Subject: [PATCH 138/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5d214cc7c79a33bec8a23b989b6faa6c0622415f Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:58:27 +0000 Subject: [PATCH 139/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 01f3f4201cfb29d4ae220dee12810017d4aec154 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:58:40 +0000 Subject: [PATCH 140/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 0b157a7909044b07ace40e1341568750c6226bd9 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:58:54 +0000 Subject: [PATCH 141/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e374e90330b21e83a5b3ed3db18f0b707d93ffa5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:59:09 +0000 Subject: [PATCH 142/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 29c878b605cacb47897d1570470d402073168583 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:59:23 +0000 Subject: [PATCH 143/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 3d3d0e406a7e9b96f8e4fc2cf7cbacf30db05cbf Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:59:42 +0000 Subject: [PATCH 144/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 50270fd3567f0797874ae00c9430c4f187d13668 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:59:55 +0000 Subject: [PATCH 145/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From aef1bf2ebe8c284ddad43bae22c0e90e82686c87 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:00:12 +0000 Subject: [PATCH 146/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 0fc78c334867b098269e94d1c8419672a50c7996 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:00:25 +0000 Subject: [PATCH 147/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 79382f52fc580855057ad02984bd72d2a85be15a Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:00:40 +0000 Subject: [PATCH 148/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d5135b1fb40c1bae1dffbe6f2369f5a378b1d361 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:00:53 +0000 Subject: [PATCH 149/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2f03e7e599708500237b5204798931f8610026f3 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:01:08 +0000 Subject: [PATCH 150/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From bf5d6f97f4a4c4f97c29e6f86e0d1ab18c0dbc6d Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:01:21 +0000 Subject: [PATCH 151/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cbbcd43c3ae73b085b7d9adcd3aab8f103337696 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:01:36 +0000 Subject: [PATCH 152/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 4e5688e57d0cb3695724128a3d5894fabe1c7285 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:01:50 +0000 Subject: [PATCH 153/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ef4f1dab2d5d29bbb4ca94cc0a0a303e0ec716da Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:02:04 +0000 Subject: [PATCH 154/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 803e427f42a6116e109710151fc8f92113acb6da Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:02:17 +0000 Subject: [PATCH 155/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 00337c7e59b3a523ee7d2aee73860bd9042e0a6b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:02:32 +0000 Subject: [PATCH 156/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 13fef0c32edec73d5e6ee84817e8ca5c89a25c53 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:02:45 +0000 Subject: [PATCH 157/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 60bc8cc23d964f7bd107747f830d1d5d73fe675b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:02:59 +0000 Subject: [PATCH 158/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 077fc325b341fbeef6cd92a8d16ee1cee8cc4167 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:03:13 +0000 Subject: [PATCH 159/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 9f035131b48cfa1a2614b3811b6601c438ef07ad Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:03:28 +0000 Subject: [PATCH 160/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ead82320c04cb6bb4e21c3049a1371e2616ae966 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:03:41 +0000 Subject: [PATCH 161/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c0e42e0b38c5118fa33efd0793715c8aa5e74c78 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:03:56 +0000 Subject: [PATCH 162/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 89d3946f8fa86e6113da60e199bd1d9d7e4eb799 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:04:09 +0000 Subject: [PATCH 163/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 59cb8ced0d9d6e34ca2f121c891007159d9d1a03 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:04:24 +0000 Subject: [PATCH 164/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 33d2af2f0467a1c2a2a719cc61ea9856d62d8d4c Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:04:38 +0000 Subject: [PATCH 165/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 53b3560b44c1d4916771db2973558c238c2d353d Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:04:51 +0000 Subject: [PATCH 166/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d6c1a4b1fde5f07acd836c646d2ecf9e8f2236ba Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:05:04 +0000 Subject: [PATCH 167/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 241ec733bed44605e8925dab8e48b7d70f6415d2 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:05:18 +0000 Subject: [PATCH 168/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 45895292c82c28fb7a9fb238003139c04296bc6a Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:05:32 +0000 Subject: [PATCH 169/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b73b96a4d36a954d92dc8cd4c77947580d71626d Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:07:30 +0000 Subject: [PATCH 170/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 920dc0d17b91b76510ce9b26f249afdc79575117 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:07:43 +0000 Subject: [PATCH 171/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 72217516ada2dc504f3e78fe562e8b71f6a6300b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:09:26 +0000 Subject: [PATCH 172/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 24cc6895ba0d9ce6904e88adf5becb8fa6441b38 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:10:25 +0000 Subject: [PATCH 173/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e6fe24e96f3248c9447083b741abd7ee3237b5d7 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:11:38 +0000 Subject: [PATCH 174/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 6e27e77e0b205ced06509d2d0a7fe8b4252e432f Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:11:54 +0000 Subject: [PATCH 175/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5d1441580f7fe1888b65a08bad4c9004b9e50fc2 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:13:23 +0000 Subject: [PATCH 176/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From db5f886efb0f910a3f1adb226d213b2b7d774f3b Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:13:38 +0000 Subject: [PATCH 177/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 712485d00dec3c484f6f3f79990610cfaebb343e Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:16:10 +0000 Subject: [PATCH 178/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a93df0b0c9a647974c068acce10dc8d16097710e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:16:22 +0000 Subject: [PATCH 179/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ecc90d8350415a02abbf2e2737d3fc590461df0c Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:18:33 +0000 Subject: [PATCH 180/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 7b2e93e61502293662cfa7ed780a544d4920eeb9 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:18:48 +0000 Subject: [PATCH 181/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 481ae956b976ae66035d80ed0c46921393f40415 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:19:06 +0000 Subject: [PATCH 182/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 96b7c73eb5c04caba2f2d60bdcb7221985e7c8be Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:19:20 +0000 Subject: [PATCH 183/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 0f8dbe32c83919e08acfc17fb1038f1ecf954f24 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:19:35 +0000 Subject: [PATCH 184/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ae1f10a9ed51c1a4f7cb1d042298169619b70cbd Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:19:55 +0000 Subject: [PATCH 185/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 333044e81775f1b25a2fe41d1a717233b3d80b69 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:20:14 +0000 Subject: [PATCH 186/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a7bcf64899996d166c07b7216624f0fb0653d650 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:20:35 +0000 Subject: [PATCH 187/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cd01a0f9597d9ed3d75fc80f6d814c23d179a029 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:20:51 +0000 Subject: [PATCH 188/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 86eea570903f394a658c02b821d91607961bb723 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:21:11 +0000 Subject: [PATCH 189/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 79f27ae4ba1b11899af644fca60e1c6a3ec5ede2 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:21:28 +0000 Subject: [PATCH 190/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cfb4504f4412858c55775d61a179b223f1a59cba Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:21:46 +0000 Subject: [PATCH 191/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 26cf30019cd2184a028f7c067ccb6a36cf8e0f20 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:22:02 +0000 Subject: [PATCH 192/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2b3d54f1e29094b0353845df31d951ca11598ece Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:22:16 +0000 Subject: [PATCH 193/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e33171bfb8aff856af118f34730729ce38f2d1a0 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:22:32 +0000 Subject: [PATCH 194/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From f5e0187a3377ce23b93a5c75827cb3645890580e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:22:48 +0000 Subject: [PATCH 195/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 5494d239139aedc70bc758050165e90a2b0e10a2 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:23:06 +0000 Subject: [PATCH 196/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 704e94551bc53ddea25c6bdeeb80f7c9493c3959 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:23:20 +0000 Subject: [PATCH 197/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d92c7d5e0f174260b7c2c48fffa2a4aafc5668a8 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:23:35 +0000 Subject: [PATCH 198/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 56cf92b3b187488301c56d821bcadf939e77a095 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:23:49 +0000 Subject: [PATCH 199/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cf36253df0859b1a47e0c489f1786d907825e340 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:24:06 +0000 Subject: [PATCH 200/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2896d0ec45429e646f30c90db2c37bc261119653 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:24:22 +0000 Subject: [PATCH 201/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 7ad511126d6ec1ea0fb9ff931137f3d6e2063ed0 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:24:44 +0000 Subject: [PATCH 202/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From bf8a9448b961a24937522bc89a8566faf6ff4deb Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:25:08 +0000 Subject: [PATCH 203/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2d17ece406e7e065bb607d8be3898acb6c2c5c99 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:25:38 +0000 Subject: [PATCH 204/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2826dbff536f2393fc1d43df99e310b397750367 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:26:36 +0000 Subject: [PATCH 205/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cf3402b623501ac034879d4ee83d56a9a0afb581 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:26:53 +0000 Subject: [PATCH 206/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From bb0e54baa539838532d225b3624b156e36610a3d Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:27:06 +0000 Subject: [PATCH 207/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 302f71df31da982ceef1af35b0f87410be6d3a16 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:27:20 +0000 Subject: [PATCH 208/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 6a65768b4394f73db7a9fabfd2b128d84a81c24d Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:27:35 +0000 Subject: [PATCH 209/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 3531c638b99c6361a816441263d7f3564947a963 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:27:53 +0000 Subject: [PATCH 210/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2b390177317b1f8e11d74b6bbcb28a67095312e8 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:28:07 +0000 Subject: [PATCH 211/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b716c42345d04af4f6e792b816810a54f5329ee8 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:28:23 +0000 Subject: [PATCH 212/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 6181a0b27369f3a72eec2337374047f89ab82d0e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:28:37 +0000 Subject: [PATCH 213/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b0a8429f9bd08cf1a815ca55c41a4c00e4d15c45 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:28:50 +0000 Subject: [PATCH 214/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 1c79f6b412e22ca124d2b125a516ee7a20264599 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:29:04 +0000 Subject: [PATCH 215/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2c4da46658a882945aa69dd68a0aacf59b4fdccc Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:29:18 +0000 Subject: [PATCH 216/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From f86ea6988cade4266141f97187daefe4252e11fc Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:29:31 +0000 Subject: [PATCH 217/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cba0dd05dacad49b8f7f7682b42b65c091dd0c30 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:29:44 +0000 Subject: [PATCH 218/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From fd752a2b34001b8e520103cb371ec61eb9c65232 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:29:58 +0000 Subject: [PATCH 219/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From dfd329905a6d12399e108e4a5aac86ef5170385c Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:30:12 +0000 Subject: [PATCH 220/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b89dbdcab918b531cc64a800e66cdf0508206890 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:30:25 +0000 Subject: [PATCH 221/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b54ab8b151cf974682affb9cb96e4226f6ce2167 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:30:39 +0000 Subject: [PATCH 222/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a48de924d28d851d2626b07ccd2ab54dbbf0243d Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:30:53 +0000 Subject: [PATCH 223/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e4aa1c9eb3378d2a3a2da3762ab622b8abe982c5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:31:05 +0000 Subject: [PATCH 224/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 92f19333e4d9ca0b172f8ee9d04278c2e901f1e4 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:31:18 +0000 Subject: [PATCH 225/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2136b1409f898fe554d9446b145a9b808e38b9fd Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:31:32 +0000 Subject: [PATCH 226/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From e515c630870cc1411ef65d227164c300bc7e939e Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:31:46 +0000 Subject: [PATCH 227/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 58eae0a558cbffd7f19484cd188ce88764ba97ba Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:31:59 +0000 Subject: [PATCH 228/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From b2c1f118b35e6bf7b068b8b9d2223c125788e667 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:32:13 +0000 Subject: [PATCH 229/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 22e09890f942aa51aa791676d1edfbde37061fd9 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:32:28 +0000 Subject: [PATCH 230/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 1ad785816f902b5c7c2d465c25eb419105f1cef8 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:32:42 +0000 Subject: [PATCH 231/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 2d8c222367ea6de3a7258759f1da84b421780f33 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:32:59 +0000 Subject: [PATCH 232/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 7ac90f0a6911f14eac4fda47ccde717d3b01fc19 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:33:13 +0000 Subject: [PATCH 233/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 4340f50fb4802b9abcda1c3f4e095cc72af1d993 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:33:27 +0000 Subject: [PATCH 234/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 116259a1ac85ed4057cf39dc9ecfa13b1378ce46 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:33:41 +0000 Subject: [PATCH 235/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cd73eba452fcf8a2a077130883e9dae61cc0d12f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:33:55 +0000 Subject: [PATCH 236/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From f052060408344fd48dc6fac865863631f6805bc0 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:34:08 +0000 Subject: [PATCH 237/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 05828c597e52717067f3239c74872d26dac8bc2d Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:34:21 +0000 Subject: [PATCH 238/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 07197260560e72368f6068a9ff1248eee06a9224 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:34:35 +0000 Subject: [PATCH 239/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 752e41ad30a19c73e68fd3bc21faf0df06039361 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:34:50 +0000 Subject: [PATCH 240/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From cc77dd9193fb5f07f315cac1593cc6cb6254a67c Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:35:03 +0000 Subject: [PATCH 241/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a5b7a64412830daf57585d7eefcf1337d2f9beab Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:35:18 +0000 Subject: [PATCH 242/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 42a5eae504ad636016b1fab3c0b7dac83346af01 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:35:32 +0000 Subject: [PATCH 243/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d83a3f483d2a93bd1c9baf7722fd7778424c0ac8 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:35:47 +0000 Subject: [PATCH 244/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d7672a29dd354fd6040409895e5c52bd26f006dd Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:35:59 +0000 Subject: [PATCH 245/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 3347f6fdf20e5d75093d708bb604189bc48e6984 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:36:14 +0000 Subject: [PATCH 246/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 282b1fc4d629db6c4cf4942e3ae27f673dc5ac31 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:36:28 +0000 Subject: [PATCH 247/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 12473098e753754d6c805a7e31d1324a03b8b41c Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:36:42 +0000 Subject: [PATCH 248/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 6ebb9cae59cf64a1f4e25b50c0a5dbeb4fcd7fcb Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:36:55 +0000 Subject: [PATCH 249/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 45f743dc8541a1f461a9b98e42e41226bcffd90f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:37:11 +0000 Subject: [PATCH 250/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From d1d64b5f00aee7c36bd625e25ca16ad2c36019aa Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:37:25 +0000 Subject: [PATCH 251/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From c11615968928a5a87b9bbe1ce4ff2805aaf3ee32 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:37:39 +0000 Subject: [PATCH 252/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 0812f9704f283df5eb55d647177ad5242feca140 Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:37:52 +0000 Subject: [PATCH 253/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 74debc37f6ac8a5c5740eecd9cfec6a916fb316a Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:38:06 +0000 Subject: [PATCH 254/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From a6e96d4c22fd24709ffdd5f459acc8de882e53cf Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:38:19 +0000 Subject: [PATCH 255/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From bf26d8b0e304400c1a069e6bd2df35bf9df92782 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:38:34 +0000 Subject: [PATCH 256/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From ac231377f92421b7267e56bdc5badb56b575430a Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:38:48 +0000 Subject: [PATCH 257/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 32676ee548d79f4724bee36fe641bf4881c4ed14 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:39:02 +0000 Subject: [PATCH 258/259] style: Format code with black and yapf --- demo_code.py | 18 ++++++------------ security.py | 9 ++++----- tests/test_code.py | 1 + 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/demo_code.py b/demo_code.py index c56646ce7..2f8f497d4 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,18 +92,12 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if ( - initial_condition - and ( - isinstance(object, int) - or isinstance(object, float) - or isinstance(object, str) - ) - and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) - and (isinstance(baz, float) or isinstance(baz, int)) - ): + if (initial_condition and + (isinstance(object, int) or isinstance(object, float) + or isinstance(object, str)) and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) and + (isinstance(baz, float) or isinstance(baz, int))): pass diff --git a/security.py b/security.py index b8b179b51..ac87f72af 100644 --- a/security.py +++ b/security.py @@ -3,6 +3,7 @@ class ResidentsDb: + def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -22,15 +23,13 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name) - ) + "SELECT id FROM userdata WHERE Name ={};".format(name)) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get( - "https://pypi.python.org/pypi/bgmi/json", verify=False - ).json()["info"]["version"] + version = requests.get("https://pypi.python.org/pypi/bgmi/json", + verify=False).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index ee6cfbf13..a982dec9f 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,5 +8,6 @@ def test_random_number_generator(): class Tests(unittest.TestCase): + def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2) From 769b2beca20956233fb0db91ef0c4d05924045be Mon Sep 17 00:00:00 2001 From: "deepsource-dev-autofix[bot]" <61578317+deepsource-dev-autofix[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:39:16 +0000 Subject: [PATCH 259/259] style: Format code with yapf and black --- demo_code.py | 18 ++++++++++++------ security.py | 9 +++++---- tests/test_code.py | 1 - 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/demo_code.py b/demo_code.py index 2f8f497d4..c56646ce7 100644 --- a/demo_code.py +++ b/demo_code.py @@ -92,12 +92,18 @@ def tar_something(): def bad_isinstance(initial_condition, object, other_obj, foo, bar, baz): - if (initial_condition and - (isinstance(object, int) or isinstance(object, float) - or isinstance(object, str)) and isinstance(other_obj, float) - and isinstance(foo, str) - or (isinstance(bar, float) or isinstance(bar, str)) and - (isinstance(baz, float) or isinstance(baz, int))): + if ( + initial_condition + and ( + isinstance(object, int) + or isinstance(object, float) + or isinstance(object, str) + ) + and isinstance(other_obj, float) + and isinstance(foo, str) + or (isinstance(bar, float) or isinstance(bar, str)) + and (isinstance(baz, float) or isinstance(baz, int)) + ): pass diff --git a/security.py b/security.py index ac87f72af..b8b179b51 100644 --- a/security.py +++ b/security.py @@ -3,7 +3,6 @@ class ResidentsDb: - def __init__(self, table_name, mapping_function, duration): """Set location on disk data cache will reside. Also sets the table name and refresh duration @@ -23,13 +22,15 @@ def open(self): def get_id_from_name(self, name): """Get id of resident from name.""" data = self.cursor.execute( - "SELECT id FROM userdata WHERE Name ={};".format(name)) + "SELECT id FROM userdata WHERE Name ={};".format(name) + ) self.conn.commit() return data def fetch_version(request): """Fetch verison of bgmi.""" - version = requests.get("https://pypi.python.org/pypi/bgmi/json", - verify=False).json()["info"]["version"] + version = requests.get( + "https://pypi.python.org/pypi/bgmi/json", verify=False + ).json()["info"]["version"] return version diff --git a/tests/test_code.py b/tests/test_code.py index a982dec9f..ee6cfbf13 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -8,6 +8,5 @@ def test_random_number_generator(): class Tests(unittest.TestCase): - def my_test(self, arg1, arg2): self.assertEquals(arg1, arg2)