[gentoo-portage-dev] Re: [PATCH] lib/portage/repository/config.py: fix trailing-comma-tuple

2020-08-04 Thread Zac Medico
On 8/4/20 7:35 PM, Aaron Bauman wrote:
> * This fixes the one instance of trailing-comma-tuple in the repo
> * A tuple does need created, but lets do so inside of parentheses as
>   expected
> 
> Suggested-By: Sam James 
> Suggested-By: Zac Medico 
> Signed-off-by: Aaron Bauman 
> ---
>  lib/portage/repository/config.py | 2 +-
>  pylintrc | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/portage/repository/config.py 
> b/lib/portage/repository/config.py
> index 0f3e582f8..f7c956dd8 100644
> --- a/lib/portage/repository/config.py
> +++ b/lib/portage/repository/config.py
> @@ -871,7 +871,7 @@ class RepoConfigLoader:
>   continue
>   if repo.masters is None:
>   if self.mainRepo() and repo_name != 
> self.mainRepo().name:
> - repo.masters = self.mainRepo(),
> + repo.masters = (self.mainRepo(),)
>   else:
>   repo.masters = ()
>   else:
> diff --git a/pylintrc b/pylintrc
> index 337311daa..5e13f714c 100644
> --- a/pylintrc
> +++ b/pylintrc
> @@ -21,7 +21,8 @@ enable=
>  redefined-builtin,
>  reimported,
>  relative-beyond-top-level,
> -trailing-newlines,
> +trailing-comma-tuple,
> + trailing-newlines,
>  trailing-whitespace,
>  unexpected-line-ending-format,
>  unnecessary-semicolon,
> 

Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=3e0063094ce656a173f46a9a4837260322769f2e
-- 
Thanks,
Zac



signature.asc
Description: OpenPGP digital signature


[gentoo-portage-dev] [PATCH] lib/portage/repository/config.py: fix trailing-comma-tuple

2020-08-04 Thread Aaron Bauman
* This fixes the one instance of trailing-comma-tuple in the repo
* A tuple does need created, but lets do so inside of parentheses as
  expected

Suggested-By: Sam James 
Suggested-By: Zac Medico 
Signed-off-by: Aaron Bauman 
---
 lib/portage/repository/config.py | 2 +-
 pylintrc | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/portage/repository/config.py b/lib/portage/repository/config.py
index 0f3e582f8..f7c956dd8 100644
--- a/lib/portage/repository/config.py
+++ b/lib/portage/repository/config.py
@@ -871,7 +871,7 @@ class RepoConfigLoader:
continue
if repo.masters is None:
if self.mainRepo() and repo_name != 
self.mainRepo().name:
-   repo.masters = self.mainRepo(),
+   repo.masters = (self.mainRepo(),)
else:
repo.masters = ()
else:
diff --git a/pylintrc b/pylintrc
index 337311daa..5e13f714c 100644
--- a/pylintrc
+++ b/pylintrc
@@ -21,7 +21,8 @@ enable=
 redefined-builtin,
 reimported,
 relative-beyond-top-level,
-trailing-newlines,
+trailing-comma-tuple,
+   trailing-newlines,
 trailing-whitespace,
 unexpected-line-ending-format,
 unnecessary-semicolon,
-- 
2.28.0




Re: [gentoo-portage-dev] [PATCH] DEVELOPING: Update minimum python version

2020-08-04 Thread Zac Medico
On 8/4/20 6:05 PM, Aaron Bauman wrote:
> * Other style/readability fixes
> 
> Signed-off-by: Aaron Bauman 
> ---
>  DEVELOPING | 18 +++---
>  1 file changed, 11 insertions(+), 7 deletions(-)

Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=7b3896ccf0001eedc02735b4379bbd7d78bb2449
-- 
Thanks,
Zac



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-portage-dev] [PATCH 1/2] lib/portage/repository/config.py: fix trailing comma

2020-08-04 Thread Brian Dolbec
On Tue, 4 Aug 2020 21:56:08 -0400
Aaron Bauman  wrote:

> On Tue, Aug 04, 2020 at 09:43:03PM -0400, Aaron Bauman wrote:
> > * This fixes the one instance of a trailing comma in the repo which
> >   actually causes a tuple to be created.
> > 
> > Signed-off-by: Aaron Bauman 
> > ---
> >  lib/portage/repository/config.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/portage/repository/config.py
> > b/lib/portage/repository/config.py index 0f3e582f8..f4dd834b5 100644
> > --- a/lib/portage/repository/config.py
> > +++ b/lib/portage/repository/config.py
> > @@ -871,7 +871,7 @@ class RepoConfigLoader:
> > continue
> > if repo.masters is None:
> > if self.mainRepo() and repo_name
> > != self.mainRepo().name:
> > -   repo.masters =
> > self.mainRepo(),
> > +   repo.masters =
> > self.mainRepo() else:
> > repo.masters = ()
> > else:
> > -- 
> > 2.28.0
> > 
> >   
> 
> Please disregard this patch series.
> 
Please don't enable this check.  Pylint is stupid to enforce this one.
When adding another item to the list or dictionary, it is better to
have the tailing comma already in place.  Git blame doesn't work if you
have to add the comma to extend the list, etc..  It also adds
unnecessary churn for something that does not affect operation in the
slightest.

Is one of the bad ones pylint wants to enforce.



Re: [gentoo-portage-dev] [PATCH 1/2] lib/portage/repository/config.py: fix trailing comma

2020-08-04 Thread Aaron Bauman
On Tue, Aug 04, 2020 at 09:43:03PM -0400, Aaron Bauman wrote:
> * This fixes the one instance of a trailing comma in the repo which
>   actually causes a tuple to be created.
> 
> Signed-off-by: Aaron Bauman 
> ---
>  lib/portage/repository/config.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/portage/repository/config.py 
> b/lib/portage/repository/config.py
> index 0f3e582f8..f4dd834b5 100644
> --- a/lib/portage/repository/config.py
> +++ b/lib/portage/repository/config.py
> @@ -871,7 +871,7 @@ class RepoConfigLoader:
>   continue
>   if repo.masters is None:
>   if self.mainRepo() and repo_name != 
> self.mainRepo().name:
> - repo.masters = self.mainRepo(),
> + repo.masters = self.mainRepo()
>   else:
>   repo.masters = ()
>   else:
> -- 
> 2.28.0
> 
> 

Please disregard this patch series.

-- 
Cheers,
Aaron


signature.asc
Description: PGP signature


[gentoo-portage-dev] [PATCH 2/2] pylintrc: turn on trailing commas check

2020-08-04 Thread Aaron Bauman
Signed-off-by: Aaron Bauman 
---
 pylintrc | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pylintrc b/pylintrc
index 337311daa..d651cd1ee 100644
--- a/pylintrc
+++ b/pylintrc
@@ -13,15 +13,16 @@
 
#disable=no-absolute-import,bad-continuation,C0103,C0114,C0115,E1101,W0201,no-name-in-module
 disable=all
 enable=
-cyclic-import,
+   cyclic-import,
 import-self,
 misplaced-future,
 missing-final-newline,
 mixed-line-endings,
-redefined-builtin,
+   redefined-builtin,
 reimported,
 relative-beyond-top-level,
-trailing-newlines,
+   trailing-comma-tuple,
+   trailing-newlines,
 trailing-whitespace,
 unexpected-line-ending-format,
 unnecessary-semicolon,
-- 
2.28.0




[gentoo-portage-dev] [PATCH 1/2] lib/portage/repository/config.py: fix trailing comma

2020-08-04 Thread Aaron Bauman
* This fixes the one instance of a trailing comma in the repo which
  actually causes a tuple to be created.

Signed-off-by: Aaron Bauman 
---
 lib/portage/repository/config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/repository/config.py b/lib/portage/repository/config.py
index 0f3e582f8..f4dd834b5 100644
--- a/lib/portage/repository/config.py
+++ b/lib/portage/repository/config.py
@@ -871,7 +871,7 @@ class RepoConfigLoader:
continue
if repo.masters is None:
if self.mainRepo() and repo_name != 
self.mainRepo().name:
-   repo.masters = self.mainRepo(),
+   repo.masters = self.mainRepo()
else:
repo.masters = ()
else:
-- 
2.28.0




[gentoo-portage-dev] [PATCH] DEVELOPING: Update minimum python version

2020-08-04 Thread Aaron Bauman
* Other style/readability fixes

Signed-off-by: Aaron Bauman 
---
 DEVELOPING | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/DEVELOPING b/DEVELOPING
index 31b559402..7bc559125 100644
--- a/DEVELOPING
+++ b/DEVELOPING
@@ -1,17 +1,15 @@
 Code Guidelines
 ---
+
 A few code guidelines to try to stick to, please comment if none of
 these make sense, they are pretty basic and mostly apply to old code.
-However for people who are looking at current code, they make take up
+However for people who are looking at current code, they may take up
 bad habits that exist in the current codebase.
 
 Python Version
 --
 
-Python 2.7 is the minimum supported version as it eases 3.x compatibility.
-All exception handling should use Python 3 'except' syntax, and the print
-function should be used instead of Python 2's print statement (use "from
-__future__ import print_function" everywhere).
+Python 3.6 is the minimum supported version.
 
 Dependencies
 
@@ -30,7 +28,7 @@ width.
 Line-Wrapping
 -
 
-Lines should typically not be longer than 80 characters; if they are an
+Lines should typically not be longer than 80 characters; if they are, an
 attempt should be made to wrap them.  Move code to the line below and
 indent once (\t).
 
@@ -47,7 +45,7 @@ errors.append(MalformedMetadata(
   attr='DESCRIPTION.toolong')
 
 The mixing of tabs and spaces means other developers can't read what you
-did. This is why the python peps state spaces over tabs; because with
+did. This is why the Python PEPs state spaces over tabs; because with
 spaces the line wrapping is always clear (but you cannot convert spaces
 as easily as tabwidth).
 
@@ -189,12 +187,18 @@ at 72.  Prefix the message with the component you touched 
if this makes
 sense.  Postfix the message with the bug it fixes, if it does.
 
 Feel free to use the following notes (if applicable):
+
 Signed-off-by: Wrote (a substantial portion of) the patch
+
 Reviewed-by: Reviewed the patch thoroughly
+
 Tested-by:  Tested the patch thoroughly
+
 Acked-by: Approved the concept but did not read the patch in detail
 (typically used by the maintainer of a specific portion, or a lead)
+
 Suggested-by: Designed the implementation
+
 Requested-by: Reported the bug/made the feature request
 
 Example:
-- 
2.28.0




Re: [gentoo-portage-dev] [PATCH] pylintrc: add more module checks

2020-08-04 Thread Zac Medico
On 8/4/20 7:08 AM, Aaron Bauman wrote:
> * Repo is already clear... so let's turn these on
> 
> Signed-off-by: Aaron Bauman 
> ---
>  pylintrc | 25 -
>  1 file changed, 16 insertions(+), 9 deletions(-)
> 
> diff --git a/pylintrc b/pylintrc
> index ad32f70d7..cd76d38dd 100644
> --- a/pylintrc
> +++ b/pylintrc
> @@ -13,16 +13,23 @@
>  
> #disable=no-absolute-import,bad-continuation,C0103,C0114,C0115,E1101,W0201,no-name-in-module
>  disable=all
>  enable=
> - missing-final-newline,
> - mixed-line-endings,
> - redefined-builtin,
> - reimported,
> +cyclic-import,
> +import-error,
> + import-self,
> +misplaced-future,
> +missing-final-newline,
> +mixed-line-endings,
> +redefined-builtin,
> +reimported,
> +relative-beyond-top-level,
>   trailing-newlines,
> - trailing-whitespace,
> - unexpected-line-ending-format,
> - unnecessary-semicolon,
> - unused-import,
> - useless-object-inheritance
> +trailing-whitespace,
> +unexpected-line-ending-format,
> +unnecessary-semicolon,
> +unused-import,
> +useless-import-alias,
> +useless-object-inheritance,
> +wildcard-import
>  
>  # A comma-separated list of package or module names from where C extensions 
> may
>  # be loaded. Extensions are loading into the active Python interpreter and 
> may
> 

Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=8b10dc3f5bd1ed85f0944ca6f2e9bb6fdafa7f40
-- 
Thanks,
Zac



signature.asc
Description: OpenPGP digital signature


[gentoo-portage-dev] [PATCH] pylintrc: add more module checks

2020-08-04 Thread Aaron Bauman
* Repo is already clear... so let's turn these on

Signed-off-by: Aaron Bauman 
---
 pylintrc | 25 -
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/pylintrc b/pylintrc
index ad32f70d7..cd76d38dd 100644
--- a/pylintrc
+++ b/pylintrc
@@ -13,16 +13,23 @@
 
#disable=no-absolute-import,bad-continuation,C0103,C0114,C0115,E1101,W0201,no-name-in-module
 disable=all
 enable=
-   missing-final-newline,
-   mixed-line-endings,
-   redefined-builtin,
-   reimported,
+cyclic-import,
+import-error,
+   import-self,
+misplaced-future,
+missing-final-newline,
+mixed-line-endings,
+redefined-builtin,
+reimported,
+relative-beyond-top-level,
trailing-newlines,
-   trailing-whitespace,
-   unexpected-line-ending-format,
-   unnecessary-semicolon,
-   unused-import,
-   useless-object-inheritance
+trailing-whitespace,
+unexpected-line-ending-format,
+unnecessary-semicolon,
+unused-import,
+useless-import-alias,
+useless-object-inheritance,
+wildcard-import
 
 # A comma-separated list of package or module names from where C extensions may
 # be loaded. Extensions are loading into the active Python interpreter and may
-- 
2.28.0