Skip to content

Commit 37fe15f

Browse files
Typos found by codespell
1 parent 61a3f63 commit 37fe15f

19 files changed

+62
-62
lines changed

PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Author: Guillaume Aubert
77
Author-email: [email protected]
88
License: GPL v3.0
99
Description: Gmvault is a tool allowing users to backup and restore their gmail account. This tool allows one shot backups or regular backups.
10-
Gmvault will restore your gmail account as it was. Don't let that part of your life disapear.
10+
Gmvault will restore your gmail account as it was. Don't let that part of your life disappear.
1111

1212
Platform: UNKNOWN

RELEASE-NOTE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ New Features:
161161
- GTalk chats can be restored in any accounts in the label gmvault-chats as the official Gmail Chats label in read-only.
162162
- Add the check command for cleaning your Gmvault db. With check, Gmvault-db will reflect your Gmail account and emails that have been trashed on Gmail will be deleted from the Gmvault-db.
163163
- The check option used to keep in sync the Gmvault-db with your Gmail account is now by default activated in the sync mode. Use option "--check-db" no to deactivate it.
164-
Beware if you have a Gmvault db containg emails from multiple accounts: You will have to resync in quick mode with --db-cleaning no with both accounts to no have part of it deleted.
164+
Beware if you have a Gmvault db containing emails from multiple accounts: You will have to resync in quick mode with --db-cleaning no with both accounts to no have part of it deleted.
165165
- Add options --chats-only and --emails-only to synchronise only emails or chats.
166166
- Create default configuration file $HOME/.gmvault/gmvault_defaults.conf in order to make some options customisable.
167167
- Change quick sync time to 7 days and restore time to one month to speed-up the quick modes. It can be configured in $HOME/.gmvault/gmvault_defaults.conf.

src/gmv/blowfish.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ def encrypt(self, data):
434434
'len': len(data),
435435
})
436436

437-
# Use big endianess since that's what everyone else uses
437+
# Use big endianness since that's what everyone else uses
438438
xl = (ord(data[3])) | (ord(data[2]) << 8) | (ord(data[1]) << 16) | (ord(data[0]) << 24)
439439
xr = (ord(data[7])) | (ord(data[6]) << 8) | (ord(data[5]) << 16) | (ord(data[4]) << 24)
440440

@@ -457,7 +457,7 @@ def decrypt(self, data):
457457
'len': len(data),
458458
})
459459

460-
# Use big endianess since that's what everyone else uses
460+
# Use big endianness since that's what everyone else uses
461461
cl = (ord(data[3])) | (ord(data[2]) << 8) | (ord(data[1]) << 16) | (ord(data[0]) << 24)
462462
cr = (ord(data[7])) | (ord(data[6]) << 8) | (ord(data[5]) << 16) | (ord(data[4]) << 24)
463463

@@ -551,17 +551,17 @@ def _demo(heading, source, encrypted, decrypted):
551551

552552
# Block processing
553553
text = 'testtest'
554-
crypted = cipher.encrypt(text)
555-
decrypted = cipher.decrypt(crypted)
556-
_demo("Testing block encrypt", text, repr(crypted), decrypted)
554+
encrypted = cipher.encrypt(text)
555+
decrypted = cipher.decrypt(encrypted)
556+
_demo("Testing block encrypt", text, repr(encrypted), decrypted)
557557

558558
# CTR ptocessing
559559
cipher.initCTR()
560560
text = "The quick brown fox jumps over the lazy dog"
561-
crypted = cipher.encryptCTR(text)
561+
encrypted = cipher.encryptCTR(text)
562562
cipher.initCTR()
563-
decrypted = cipher.decryptCTR(crypted)
564-
_demo("Testing CTR logic", text, repr(crypted), decrypted)
563+
decrypted = cipher.decryptCTR(encrypted)
564+
_demo("Testing CTR logic", text, repr(encrypted), decrypted)
565565

566566
# Test speed
567567
print "Testing speed"

src/gmv/cmdline_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CmdLineParser(argparse.ArgumentParser): #pylint: disable=R0904
3131
Comments regarding usability of the lib.
3232
By default you want to print the default in the help if you had them so the default formatter should print them
3333
Also new lines are eaten in the epilogue strings. You would use an epilogue to show examples most of the time so you
34-
want to have the possiblity to go to a new line. There should be a way to format the epilogue differently from the rest
34+
want to have the possibility to go to a new line. There should be a way to format the epilogue differently from the rest
3535
3636
"""
3737

src/gmv/conf/conf_helper.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class ResourceError(Exception):
2828
"""
29-
Base class for ressource exceptions
29+
Base class for resource exceptions
3030
"""
3131

3232
def __init__(self, a_msg):
@@ -35,19 +35,19 @@ def __init__(self, a_msg):
3535

3636
class Resource(object):
3737
"""
38-
Class read a ressource.
38+
Class read a resource.
3939
It can be read first from the Command Line, then from the ENV as an env variable and finally from a conf file
4040
"""
4141

4242
def __init__(self, a_cli_argument=None, a_env_variable=None, a_conf_property=None):
4343
"""
4444
Default Constructor.
45-
It is important to understand that there is precedence between the different ways to set the ressource:
45+
It is important to understand that there is precedence between the different ways to set the resource:
4646
- get from the command line if defined otherwise get from the Env variable if defined otherwise get from the conf file otherwise error
4747
4848
Args:
4949
a_cli_argument : The command line argument name
50-
a_env_variable : The env variable name used for this ressource
50+
a_env_variable : The env variable name used for this resource
5151
a_conf_property: It should be a tuple containing two elements (group,property)
5252
"""
5353

@@ -83,7 +83,7 @@ def _get_srandardized_cli_argument(cls, a_tostrip):
8383
def _get_value_from_command_line(self):
8484
"""
8585
internal method for extracting the value from the command line.
86-
All command line agruments must be lower case (unix style).
86+
All command line arguments must be lower case (unix style).
8787
To Do support short and long cli args.
8888
8989
Returns:
@@ -331,7 +331,7 @@ class Conf(object):
331331
* support for variables in configuration file
332332
* support for default values in all accessors
333333
* integrated with the resources object offering to get the configuration from an env var, a commandline option or the conf
334-
* to be done : support for blocs, list comprehension and dict comprehension, json
334+
* to be done : support for blocks, list comprehension and dict comprehension, json
335335
* to be done : define resources in the conf using the [Resource] group with A= { ENV:TESTVAR, CLI:--testvar, VAL:1.234 }
336336
337337
"""

src/gmv/conf/tests/test.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
# use the resources to get ENV Variables. Use of a special group ENV : %(ENV[HOME])
6-
# use the resources to get CLI Values. Use fo a special group CLI: %(CLI[Longname] or CLI[--Longname] or CLI[-longname]
6+
# use the resources to get CLI Values. Use of a special group CLI: %(CLI[Longname] or CLI[--Longname] or CLI[-longname]
77

88
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99
# Name : GroupTest1

src/gmv/conf/utils/struct_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def _compile_litteral(self, a_tokenizer):
431431
dummy = the_token.value[1:-1]
432432

433433
elif the_token.type == 'NAME':
434-
# intepret all non quoted names as a string
434+
# interpret all non quoted names as a string
435435
dummy = the_token.value
436436

437437
elif the_token.type == 'NUMBER':

src/gmv/credential_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def get_oauth2_credential(cls, email, renew_cred = False):
370370
"""
371371
Used once the connection has been lost. Return an auth_str obtained from a refresh token or
372372
with the current access token if it is still valid
373-
:param email: user email used to load refresh token from peristent file
373+
:param email: user email used to load refresh token from persistent file
374374
:return: credential { 'type' : 'oauth2', 'value' : auth_str, 'option':None }
375375
"""
376376
oauth2_creds = cls.read_oauth2_tok_sec(email)

src/gmv/gmv_cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121

122122
class NotSeenAction(argparse.Action): #pylint:disable=R0903,w0232
123123
"""
124-
to differenciate between a seen and non seen command
124+
to differentiate between a seen and non seen command
125125
"""
126126
def __call__(self, parser, namespace, values, option_string=None):
127127
if values:
@@ -835,7 +835,7 @@ def setup_default_conf():
835835
"""
836836
set the environment GMVAULT_CONF_FILE which is necessary for Conf object
837837
"""
838-
gmvault_utils.get_conf_defaults() # force instanciation of conf to load the defaults
838+
gmvault_utils.get_conf_defaults() # force instantiation of conf to load the defaults
839839

840840
def bootstrap_run():
841841
""" temporary bootstrap """
@@ -856,7 +856,7 @@ def bootstrap_run():
856856
LOG.critical("Activate debugging information.")
857857
activate_debug_mode()
858858

859-
# force instanciation of conf to load the defaults
859+
# force instantiation of conf to load the defaults
860860
gmvault_utils.get_conf_defaults()
861861

862862
gmvlt.run(args)

src/gmv/gmvault.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def handle_restore_imap_error(the_exception, gm_id, db_gmail_ids_info, gmvaulter
5555
gmvaulter.src.reconnect() #reconnect
5656

5757
elif isinstance(the_exception, imaplib.IMAP4.error):
58-
LOG.error("Catched IMAP Error %s" % (str(the_exception)))
58+
LOG.error("Caught IMAP Error %s" % (str(the_exception)))
5959
LOG.exception(the_exception)
6060

6161
#When the email cannot be read from Database because it was empty when returned by gmail imap
@@ -271,7 +271,7 @@ def __init__(self, db_root_dir, host, port, login, \
271271
#instantiate gstorer
272272
self.gstorer = gmvault_db.GmailStorer(self.db_root_dir, self.use_encryption)
273273

274-
#timer used to mesure time spent in the different values
274+
#timer used to measure time spent in the different values
275275
self.timer = gmvault_utils.Timer()
276276

277277
@classmethod
@@ -634,7 +634,7 @@ def sync(self, imap_req, compress_on_disk = True, \
634634
else:
635635
LOG.critical("\nSkip chats synchronization.\n")
636636

637-
#delete supress emails from DB since last sync
637+
#delete suppress emails from DB since last sync
638638
self.check_clean_db(db_cleaning)
639639

640640
LOG.debug("Sync operation performed in %s.\n" \
@@ -775,7 +775,7 @@ def check_clean_db(self, db_cleaning):
775775

776776
LOG.debug("Got %s emails imap_id(s) from the Gmail Server." % (len(imap_ids)))
777777

778-
#delete supress emails from DB since last sync
778+
#delete suppress emails from DB since last sync
779779
self._delete_sync(imap_ids, db_gmail_ids, db_gmail_ids_info, 'email')
780780

781781
# get all chats ids
@@ -792,7 +792,7 @@ def check_clean_db(self, db_cleaning):
792792

793793
LOG.debug("Got %s chat imap_ids from the Gmail Server." % (len(chat_ids)))
794794

795-
#delete supress emails from DB since last sync
795+
#delete suppress emails from DB since last sync
796796
self._delete_sync(chat_ids, db_chat_ids, db_gmail_ids_info , 'chat')
797797
else:
798798
LOG.critical("Chats IMAP Directory not visible on Gmail. Ignore deletion of chats.")
@@ -1055,7 +1055,7 @@ def restore_emails(self, pivot_dir = None, extra_labels = [], restart = False):
10551055
restore emails in a gmail account using batching to group restore
10561056
If you are not in "All Mail" Folder, it is extremely fast to push emails.
10571057
But it is not possible to reapply labels if you are not in All Mail because the uid which is returned
1058-
is dependant on the folder. On the other hand, you can restore labels in batch which would help gaining lots of time.
1058+
is dependent on the folder. On the other hand, you can restore labels in batch which would help gaining lots of time.
10591059
The idea is to get a batch of 50 emails and push them all in the mailbox one by one and get the uid for each of them.
10601060
Then create a dict of labels => uid_list and for each label send a unique store command after having changed dir
10611061
"""

0 commit comments

Comments
 (0)