You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by sebb <se...@gmail.com> on 2021/05/12 10:49:41 UTC
svnpubsub/commit-hook.py:65 - variable url assigned but not used
As the subject says
Re: svnpubsub/commit-hook.py:65 - variable url assigned but not used
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
sebb wrote on Fri, 14 May 2021 11:44 +00:00:
> On Fri, 14 May 2021 at 12:22, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> > sebb wrote on Thu, 13 May 2021 14:29 +00:00:
> > > > Is it misspelt?
> >
> > ITYM "misspelled" ;-)
>
> No, I am using British English.
I know. That's what the emoticon was there to acknowledge.
Re: svnpubsub/commit-hook.py:65 - variable url assigned but not used
Posted by sebb <se...@gmail.com>.
On Fri, 14 May 2021 at 12:22, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
>
> sebb wrote on Thu, 13 May 2021 14:29 +00:00:
> > On Thu, 13 May 2021 at 15:16, sebb <se...@gmail.com> wrote:
> > > On Thu, 13 May 2021 at 15:11, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> > > >
> > > > sebb wrote on Wed, May 12, 2021 at 11:49:41 +0100:
> > > > > As the subject says
> > > >
> > > > Assuming opener.open() actually returns a URL, I don't see the problem
> > > > here. The variable documents the return type for anyone who may want
> > > > to extend the function.
> > >
> > > The problem is that it is not clear whether the variable is supposed
> > > to be used or not.
>
> Then add a comment, or return the variable, etc..
Or drop the variable entirely.
> > > Is it misspelt?
>
> ITYM "misspelled" ;-)
No, I am using British English.
> > > AIUI the convention for intentionally unused variables is to prefix
> > > the name with an underscore, as this no longer triggers the warning in
> > > PyLint
>
> Last I checked, docs.python.org said (single) leading underscores designated
> class members that weren't part of the class's public API.
>
> > Furthermore, the method does not actually return a URL.
>
> Then the variable could be renamed.
Or dropped.
> > The method behaves like the following:
> > https://python.readthedocs.io/en/v2.7.2/library/urllib2.html#urllib2.urlopen
>
> Thanks.
>
> Also, all the above discussion applies to revprop-change-hook.py, too.
>
> Daniel
Re: svnpubsub/commit-hook.py:65 - variable url assigned but not used
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
sebb wrote on Thu, 13 May 2021 14:29 +00:00:
> On Thu, 13 May 2021 at 15:16, sebb <se...@gmail.com> wrote:
> > On Thu, 13 May 2021 at 15:11, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> > >
> > > sebb wrote on Wed, May 12, 2021 at 11:49:41 +0100:
> > > > As the subject says
> > >
> > > Assuming opener.open() actually returns a URL, I don't see the problem
> > > here. The variable documents the return type for anyone who may want
> > > to extend the function.
> >
> > The problem is that it is not clear whether the variable is supposed
> > to be used or not.
Then add a comment, or return the variable, etc..
> > Is it misspelt?
ITYM "misspelled" ;-)
> > AIUI the convention for intentionally unused variables is to prefix
> > the name with an underscore, as this no longer triggers the warning in
> > PyLint
Last I checked, docs.python.org said (single) leading underscores designated
class members that weren't part of the class's public API.
> Furthermore, the method does not actually return a URL.
Then the variable could be renamed.
> The method behaves like the following:
> https://python.readthedocs.io/en/v2.7.2/library/urllib2.html#urllib2.urlopen
Thanks.
Also, all the above discussion applies to revprop-change-hook.py, too.
Daniel
Re: svnpubsub/commit-hook.py:65 - variable url assigned but not used
Posted by sebb <se...@gmail.com>.
Furthermore, the method does not actually return a URL.
The method behaves like the following:
https://python.readthedocs.io/en/v2.7.2/library/urllib2.html#urllib2.urlopen
On Thu, 13 May 2021 at 15:16, sebb <se...@gmail.com> wrote:
>
> The problem is that it is not clear whether the variable is supposed
> to be used or not.
> Is it misspelt?
>
> AIUI the convention for intentionally unused variables is to prefix
> the name with an underscore, as this no longer triggers the warning in
> PyLint
>
> On Thu, 13 May 2021 at 15:11, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> >
> > sebb wrote on Wed, May 12, 2021 at 11:49:41 +0100:
> > > As the subject says
> >
> > Assuming opener.open() actually returns a URL, I don't see the problem
> > here. The variable documents the return type for anyone who may want
> > to extend the function.
Re: svnpubsub/commit-hook.py:65 - variable url assigned but not used
Posted by sebb <se...@gmail.com>.
The problem is that it is not clear whether the variable is supposed
to be used or not.
Is it misspelt?
AIUI the convention for intentionally unused variables is to prefix
the name with an underscore, as this no longer triggers the warning in
PyLint
On Thu, 13 May 2021 at 15:11, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
>
> sebb wrote on Wed, May 12, 2021 at 11:49:41 +0100:
> > As the subject says
>
> Assuming opener.open() actually returns a URL, I don't see the problem
> here. The variable documents the return type for anyone who may want
> to extend the function.
Re: svnpubsub/commit-hook.py:65 - variable url assigned but not used
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
sebb wrote on Wed, May 12, 2021 at 11:49:41 +0100:
> As the subject says
Assuming opener.open() actually returns a URL, I don't see the problem
here. The variable documents the return type for anyone who may want
to extend the function.