Repository: python-telegram-bot/python-telegram-bot

Issue:
Typo in PicklePersistence ctor arguments
https://github.com/python-telegram-bot/python-telegram-bot/blob/2c92c356b8e3b07f20dcffa5b10fecc62b67e906/telegram/ext/picklepersistence.py#L59
`singe_file` should be `single_file`.


Discussion:

Resolving patch:
diff --git a/telegram/ext/picklepersistence.py b/telegram/ext/picklepersistence.py
--- a/telegram/ext/picklepersistence.py
+++ b/telegram/ext/picklepersistence.py
@@ -56,12 +56,12 @@ class PicklePersistence(BasePersistence):
             on any transaction *and* on call fo :meth:`flush`. Default is ``False``.
     """
 
-    def __init__(self, filename, store_user_data=True, store_chat_data=True, singe_file=True,
+    def __init__(self, filename, store_user_data=True, store_chat_data=True, single_file=True,
                  on_flush=False):
         self.filename = filename
         self.store_user_data = store_user_data
         self.store_chat_data = store_chat_data
-        self.single_file = singe_file
+        self.single_file = single_file
         self.on_flush = on_flush
         self.user_data = None
         self.chat_data = None


Test patch:
diff --git a/tests/test_persistence.py b/tests/test_persistence.py
--- a/tests/test_persistence.py
+++ b/tests/test_persistence.py
@@ -224,7 +224,7 @@ def pickle_persistence():
     return PicklePersistence(filename='pickletest',
                              store_user_data=True,
                              store_chat_data=True,
-                             singe_file=False,
+                             single_file=False,
                              on_flush=False)
 
 
@@ -233,7 +233,7 @@ def pickle_persistence_only_chat():
     return PicklePersistence(filename='pickletest',
                              store_user_data=False,
                              store_chat_data=True,
-                             singe_file=False,
+                             single_file=False,
                              on_flush=False)
 
 
@@ -242,7 +242,7 @@ def pickle_persistence_only_user():
     return PicklePersistence(filename='pickletest',
                              store_user_data=True,
                              store_chat_data=False,
-                             singe_file=False,
+                             single_file=False,
                              on_flush=False)
 
 
@@ -552,7 +552,7 @@ def second(update, context):
         pickle_persistence_2 = PicklePersistence(filename='pickletest',
                                                  store_user_data=True,
                                                  store_chat_data=True,
-                                                 singe_file=False,
+                                                 single_file=False,
                                                  on_flush=False)
         u = Updater(bot=bot, persistence=pickle_persistence_2)
         dp = u.dispatcher
@@ -572,7 +572,7 @@ def test_flush_on_stop(self, bot, update, pickle_persistence):
         pickle_persistence_2 = PicklePersistence(filename='pickletest',
                                                  store_user_data=True,
                                                  store_chat_data=True,
-                                                 singe_file=False,
+                                                 single_file=False,
                                                  on_flush=False)
         assert pickle_persistence_2.get_user_data()[4242424242]['my_test'] == 'Working!'
         assert pickle_persistence_2.get_chat_data()[-4242424242]['my_test2'] == 'Working2!'
@@ -592,7 +592,7 @@ def test_flush_on_stop_only_chat(self, bot, update, pickle_persistence_only_chat
         pickle_persistence_2 = PicklePersistence(filename='pickletest',
                                                  store_user_data=False,
                                                  store_chat_data=True,
-                                                 singe_file=False,
+                                                 single_file=False,
                                                  on_flush=False)
         assert pickle_persistence_2.get_user_data() == {}
         assert pickle_persistence_2.get_chat_data()[-4242424242]['my_test2'] == 'Working2!'
@@ -611,7 +611,7 @@ def test_flush_on_stop_only_user(self, bot, update, pickle_persistence_only_user
         pickle_persistence_2 = PicklePersistence(filename='pickletest',
                                                  store_user_data=True,
                                                  store_chat_data=False,
-                                                 singe_file=False,
+                                                 single_file=False,
                                                  on_flush=False)
         assert pickle_persistence_2.get_user_data()[4242424242]['my_test'] == 'Working!'
         assert pickle_persistence_2.get_chat_data()[-4242424242] == {}