Re: [PATCH 02/10] syntax-check: Exclude 'scripts/*.py' from 'sc_prohibit_magic_number_exit'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 25, 2024 at 08:34:40 -0800, Andrea Bolognani wrote:
> On Tue, Jan 16, 2024 at 05:12:36PM +0100, Peter Krempa wrote:
> > +++ b/build-aux/syntax-check.mk
> > @@ -1516,6 +1516,9 @@ exclude_file_name_regexp--sc_black = \
> >  exclude_file_name_regexp--sc_spacing-check = \
> >    ^scripts/rpcgen/tests/test_demo\.[ch]$$
> >
> > +exclude_file_name_regexp--sc_prohibit_magic_number_exit = \
> > +  ^scripts/.*\.py$$
> 
> If you use sys.exit() instead of exit(), like the other Python
> scripts are doing, you don't need this anymore.

Oh, I had to look up the difference and 'exit()' is allegedly meant for
interactive use, while scripts should use sys.exit(). TIL.
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux