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