[PATCH v3 14/15] qapi/parser: allow 'ch' variable name

John Snow posted 15 patches 4 years, 1 month ago
Maintainers: Michael Roth <michael.roth@amd.com>, Markus Armbruster <armbru@redhat.com>
[PATCH v3 14/15] qapi/parser: allow 'ch' variable name
Posted by John Snow 4 years, 1 month ago
We can have a two-letter variable name, as a treat.

Signed-off-by: John Snow <jsnow@redhat.com>

--

I don't want to use 'chr' or 'char', and in context 'ch' works well
enough. I will assume that any possible future uses will also be obvious
enough.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 scripts/qapi/pylintrc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
index 88efbf71cb2..c5275d5f59b 100644
--- a/scripts/qapi/pylintrc
+++ b/scripts/qapi/pylintrc
@@ -43,6 +43,7 @@ good-names=i,
            _,
            fp,  # fp = open(...)
            fd,  # fd = os.open(...)
+           ch,
 
 [VARIABLES]
 
-- 
2.30.2


Re: [PATCH v3 14/15] qapi/parser: allow 'ch' variable name
Posted by Markus Armbruster 4 years, 1 month ago
Uh, one more little thing... this commit message isn't quite right:

John Snow <jsnow@redhat.com> writes:

> We can have a two-letter variable name, as a treat.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
>
> --

This line is not a separator.

>
> I don't want to use 'chr' or 'char', and in context 'ch' works well
> enough. I will assume that any possible future uses will also be obvious
> enough.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---

This one is.

Two S-o-b.  Okay to manually toss everything after the "--" line?

>  scripts/qapi/pylintrc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
> index 88efbf71cb2..c5275d5f59b 100644
> --- a/scripts/qapi/pylintrc
> +++ b/scripts/qapi/pylintrc
> @@ -43,6 +43,7 @@ good-names=i,
>             _,
>             fp,  # fp = open(...)
>             fd,  # fd = os.open(...)
> +           ch,
>  
>  [VARIABLES]


Re: [PATCH v3 14/15] qapi/parser: allow 'ch' variable name
Posted by John Snow 4 years, 1 month ago
On 5/20/21 5:36 AM, Markus Armbruster wrote:
> Uh, one more little thing... this commit message isn't quite right:
> 
> John Snow <jsnow@redhat.com> writes:
> 
>> We can have a two-letter variable name, as a treat.
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>>
>> --
> 
> This line is not a separator.
> 
>>
>> I don't want to use 'chr' or 'char', and in context 'ch' works well
>> enough. I will assume that any possible future uses will also be obvious
>> enough.
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
> 
> This one is.
> 
> Two S-o-b.  Okay to manually toss everything after the "--" line?
> 

Whoops. Script failure because of the typo in the separator I added 
manually. Yes.

```
qapi/parser: allow 'ch' variable name

We can have a two-letter variable name, as a treat.

Signed-off-by: John Snow <jsnow@redhat.com>
```

Is fine. Any edits you want to make to my joking, not-that-useful commit 
message is also fine.

>>   scripts/qapi/pylintrc | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc
>> index 88efbf71cb2..c5275d5f59b 100644
>> --- a/scripts/qapi/pylintrc
>> +++ b/scripts/qapi/pylintrc
>> @@ -43,6 +43,7 @@ good-names=i,
>>              _,
>>              fp,  # fp = open(...)
>>              fd,  # fd = os.open(...)
>> +           ch,
>>   
>>   [VARIABLES]