Commit Graph

2729 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
3f86218e55 IMAP.py split long lines
This patch split long lines (>=80 chars)
2020-11-07 15:25:27 +01:00
Rodolfo García Peñas (kix)
319e5a03b4
Merge pull request #22 from thekix/master
Multiple style patches and bug about remotepasseval
2020-11-04 22:20:43 +01:00
Rodolfo García Peñas (kix)
7a4285370f BUG: Right format for password using remotepasseval
Reading the password using remotepasseval returns a bytes objects
instead an utf-8 string.

This patch includes support strings and bytes objects.

Closes #21

    Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2020-11-04 22:17:32 +01:00
Rodolfo García Peñas (kix)
f7534c70ce __init__.py added docstrings
Just added docstrings.
2020-11-01 13:12:03 +01:00
Rodolfo García Peñas (kix)
f53bee7335 Base.py added docstrings
Just added docstrings.
2020-11-01 13:11:52 +01:00
Rodolfo García Peñas (kix)
6010437885 __init__.py added explicit from in raise exceptions
Remove the warnings:

repository/__init__.py:66:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
repository/__init__.py:74:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
2020-11-01 12:58:39 +01:00
Rodolfo García Peñas (kix)
0f19b6e63a __init__.py removed pass
This pass is not needed, because we have docstring.
2020-11-01 12:56:57 +01:00
Rodolfo García Peñas (kix)
8c6de099f9 LocalStatus.py Renamed variable
Variable bk is renamed to bkend to avoid this pylint warning:

repository/LocalStatus.py:88:12: C0103: Variable name "bk" doesn't conform to snake_case naming style (invalid-name)
2020-11-01 12:54:59 +01:00
Rodolfo García Peñas (kix)
3e5832e828 LocalStatus.py removed unused pass
We don't need this pass because we have the docstring.
2020-11-01 12:53:34 +01:00
Rodolfo García Peñas (kix)
14020a670f LocalStatus.py added docstrings
This patch adds some docstrings.
2020-11-01 12:52:51 +01:00
Rodolfo García Peñas (kix)
2409fe8f49 IMAP.py removed warning about explicitly re-raising
This patch removes this warning:

repository/IMAP.py:146:16: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
2020-11-01 12:45:48 +01:00
Rodolfo García Peñas (kix)
f8a5b0b295 IMAP.py renamed variables
This patch renames some variables to avoid warnings like:

'e' doesn't conform to snake_case naming style (invalid-name)
2020-11-01 12:40:48 +01:00
Rodolfo García Peñas (kix)
316fcfbbee IMAP.py docstrings
This patch includes the docstrings for IMAP.py file.
2020-11-01 12:31:18 +01:00
Rodolfo García Peñas (kix)
852bc9acd9 Gmail.py use hardcoded url variable 2/2
Because the call in the if and in the else blocks is the same, we can move it outside the conditional block.

Code now is clear.
2020-11-01 10:06:32 +01:00
Rodolfo García Peñas (kix)
6b9f37e317 Gmail.py use hardcoded url variable 1/2
This patch sets the url variable to the hardcoded value. Then call the
self.setoauth2_request_url(url) function.
2020-11-01 10:04:18 +01:00
Rodolfo García Peñas (kix)
b175f7a698 Base.py sync_folder_structure returns always None
The function sync_folder_structure is only used in the accounts.py file:

kix@inle:~/src/offlineimap3/offlineimap$ rgrep sync_folder_structure *
accounts.py:            remoterepos.sync_folder_structure(localrepos, statusrepos)
repository/Base.py:    def sync_folder_structure(self, local_repo, status_repo):
kix@inle:~/src/offlineimap3/offlineimap$

The returned value is not used. We have this warning:

R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)

Because is not returning anything here, but is returning None at the function end.
We can include this None here safely.
2020-11-01 10:00:02 +01:00
Rodolfo García Peñas (kix)
1d93f90db5 Base.py renamed exception variable e to exc
This variable is renamed twice to avoid this warning:

C0103: Attribute name "e" doesn't conform to snake_case naming style (invalid-name)
2020-11-01 09:55:25 +01:00
Rodolfo García Peñas (kix)
e25bd7b48b Base.py removed unused pass
This patch removes these pass calls, because we have the docstrings and then we don't need include it.
2020-11-01 09:49:28 +01:00
Rodolfo García Peñas (kix)
20e3323718 Base.py added docstrings
This patch adds multiple docstrings.
2020-11-01 09:47:17 +01:00
Rodolfo García Peñas (kix)
62bfead5e4 Maildir.py split long lines
This patch split long lines in less 80 chars.
2020-11-01 09:29:31 +01:00
Rodolfo García Peñas (kix)
646cb4354b Maildir.py renamed variable names
This patch renames some variables to avoid these warnings:

Variable name "e" doesn't conform to snake_case naming style (invalid-name)
2020-11-01 09:26:42 +01:00
Rodolfo García Peñas (kix)
5c6e95103e Maildir.py added docstrings
This patch adds the docstring for the class and for two methods.
2020-11-01 09:21:08 +01:00
Rodolfo García Peñas (kix)
e12a702128 GmailMaildir.py Removed __init__
First, in Python 3 we don't need call the super().__init__ explicitly, because Python does it. So, we can remove the line:

super().__init__(reposname, account)

If we leafe the method __init__ empty, the parent __init__ method is not called, we need remove the __init__ and then Python uses the parent __init__ method.
2020-11-01 09:13:17 +01:00
Rodolfo García Peñas (kix)
5f338454ee GmailMaildir.py Removed parent class for super call
The super() call in Python 3 does not need the parent class. The MRO get it.
2020-11-01 09:06:35 +01:00
Rodolfo García Peñas (kix)
caea1b7baa GmailMaildir.py included class docstring
Only added docstring for the class.
2020-11-01 09:03:37 +01:00
Rodolfo García Peñas (kix)
c2fce5de38 Gmail.py removed parent class in super calls
In Python 3 we don't need specify the class for these calls, the MRO find it.
2020-11-01 09:02:09 +01:00
Rodolfo García Peñas (kix)
3f7e9fe1bd Gmail.py Changed comments to docstring
This patch changes the comments in these functions to docstrings
and remove pylint warnings.
2020-11-01 08:57:43 +01:00
Rodolfo García Peñas (kix)
fc2055de8c Gmail.py else statement not needed
Always is else here.
2020-11-01 08:54:16 +01:00
Rodolfo García Peñas (kix)
0454e3e2f1 Gmail.py swap if block
I swapped this if - else block, with the "is not". Code now is clear.
2020-11-01 08:53:08 +01:00
Rodolfo García Peñas (kix)
4198fa8201 Gmail.py else statement not needed
We don't need speficify the else here. Always is else.
2020-11-01 08:51:03 +01:00
Rodolfo García Peñas (kix)
d50a28a68f repository add docstring to files
This patch includes the docstrings for all files, removing the pylint
warning
2020-11-01 08:43:16 +01:00
Rodolfo García Peñas (kix)
e5f0f10334 distro_utils.py renamed variable f
The variable f is renamed to l_file to avoid pylint warning:

utils/distro_utils.py:95:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
2020-11-01 08:31:47 +01:00
Rodolfo García Peñas (kix)
b51fa3b9f6 distro_utils.py get dictionary value using get
This patch use get to get the value of os_name. Else, None is get.
2020-11-01 08:29:15 +01:00
Rodolfo García Peñas (kix)
4e31762ec6 distro_utils.py added docstring
Remove pylint warning about

C0114: Missing module docstring (missing-module-docstring)
2020-11-01 08:23:28 +01:00
Rodolfo García Peñas (kix)
9f34b14f72 const.py added docstring
Remove pylint warning about

C0114: Missing module docstring (missing-module-docstring)
2020-11-01 08:22:44 +01:00
Rodolfo García Peñas (kix)
3be65bf5dd pylint renamed variables
This patch renames some variables to avoid pylint warning about

Variable name "f" doesn't conform to snake_case naming style (invalid-name)

f is now file
th is now the_en
n is now count
2020-11-01 08:21:24 +01:00
Rodolfo García Peñas (kix)
cbfcd38bca stacktrace.py added docstring
Removed warning:

C0114: Missing module docstring (missing-module-docstring)
2020-11-01 08:16:19 +01:00
Rodolfo García Peñas (kix)
9239c804e9 Base.py remove redundant parenthesis
Just remove these parenthesis
2020-10-31 16:55:58 +01:00
Rodolfo García Peñas (kix)
8504cdc6b8 Base.py long lines style
This patch changes long lines (>80 chars) to lines <80 chars.
The patch only changes the style.
2020-10-31 16:55:20 +01:00
Rodolfo García Peñas (kix)
23f67019cc Base.py long lines style
This patch changes long lines (>80 chars) to lines <80 chars.
The patch only changes the style.
2020-10-31 16:43:52 +01:00
Rodolfo García Peñas (kix)
332a6d7240 IMAP.py long lines style
This patch changes long lines (>80 chars) to lines <80 chars.
The patch only changes the style.
2020-10-31 16:14:53 +01:00
Rodolfo García Peñas (kix)
1ce229ca9d IMAP.py comparison with None should use is
Comparison with None should be "is" not "=="
2020-10-31 16:12:02 +01:00
Rodolfo García Peñas (kix)
2f2f4ef918 IMAP.py long lines style
This patch changes long lines (>80 chars) to lines <80 chars.
The patch only changes the style.
2020-10-31 16:09:34 +01:00
Rodolfo García Peñas (kix)
5033340c2f IMAP.py should use encoding to read the file
This patch includes the word "encoding" to select the right argument in remotepassfile.
2020-10-31 15:53:45 +01:00
Rodolfo García Peñas (kix)
cbbeebbf44 imapserver.py removed extra parenthesis
We can remove this parenthesis.
2020-10-31 15:39:28 +01:00
Rodolfo García Peñas (kix)
0e90bcbf38 IMAP.py too many arguments for string format
We need only two arguments, not three. We can remove the self argument.
2020-10-31 15:37:50 +01:00
Rodolfo García Peñas (kix)
352133dcc0 call to setDaemon uses Bool argument
The argument 1 should be True in these files.
2020-10-31 15:35:54 +01:00
Rodolfo García Peñas (kix)
78aeed20a9 imapserver call to OfflineImapError with right arguments
Call to OfflineImapError has the arguments:

- message
- severity
- error code

The None argument ir wrong here, we can remove it and then we have three arguments not four.
2020-10-31 15:29:24 +01:00
Rodolfo García Peñas (kix)
26efc62ba7 imapserver import style
This patch removes the unused import socket line. (warning)

Split the line with multiple imports in different lines. (warning)
2020-10-31 15:24:40 +01:00
Rodolfo García Peñas (kix)
24a3692b68
Merge pull request #20 from thekix/master
Updated cram-md5 authentication
2020-10-31 00:12:42 +01:00