Repository: burnash/gspread

Issue:
API breakage in get_all_records / numericise_all fix
**Describe the bug**
The fix in #1082 accidentally broke API compatibility. When the default kwarg for get_all_records numericise_all was changed from None to an empty list this broke anyone who was passing in None explicitly as the function now assumes the argument will always be iterable.

**Code example***
Thanks to githuberto in https://github.com/dgilman/gspread_asyncio/issues/48 for finding this

Discussion:

Patch:
diff --git a/gspread/utils.py b/gspread/utils.py
index b824079..361659e 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -201,6 +201,9 @@ def numericise_all(
     :param list ignore: List of ints of indices of the row (index 1) to ignore
         numericising.
     """
+    # in case someone explicitly passes `None` as ignored list
+    ignore = ignore or []
+
     numericised_list = [
         values[index]
         if index + 1 in ignore
diff --git a/lint-requirements.txt b/lint-requirements.txt
index 3702aaa..49d856f 100644
--- a/lint-requirements.txt
+++ b/lint-requirements.txt
@@ -1,5 +1,5 @@
 bandit==1.7.0
 black==22.3.0
 codespell==2.1.0
-flake8==3.9.2
+flake8==5.0.4
 isort==5.9.3


Test patch:
diff --git a/tests/utils_test.py b/tests/utils_test.py
index 8e6de9e..802ae02 100644
--- a/tests/utils_test.py
+++ b/tests/utils_test.py
@@ -93,6 +93,9 @@ class UtilsTest(unittest.TestCase):
         expected + ["5", 5]
         self.assertEqual(utils.numericise_all(inputs, ignore=[5]), expected)
 
+        # provide explicit `None` as ignored list
+        self.assertEqual(utils.numericise_all(inputs, ignore=None), expected)
+
     def test_a1_to_grid_range_simple(self):
         expected_single_dimension = {
             "startRowIndex": 0,