@@ -1498,18 +1498,18 @@ def do_pragma(self, args):
1498
1498
raise UsageError (_ (
1499
1499
'Argument must be setting=value, was given: %s.' ) %
1500
1500
args [0 ])
1501
- else :
1502
- print (_ ("Current settings and values "
1503
- "(NYI - not yet implemented):" ))
1504
- is_verbose = self .settings ['verbose' ]
1505
- for key in sorted (self .settings .keys ()):
1506
- if key .startswith ('_' ) and not is_verbose :
1507
- continue
1508
- print (" %s=%s" % (key , self .settings [key ]))
1509
- if is_verbose :
1510
- print (" %s" % self .settings_help [key ])
1511
1501
1512
- return
1502
+ print (_ ("Current settings and values "
1503
+ "(NYI - not yet implemented):" ))
1504
+ is_verbose = self .settings ['verbose' ]
1505
+ for key in sorted (self .settings .keys ()):
1506
+ if key .startswith ('_' ) and not is_verbose :
1507
+ continue
1508
+ print (" %s=%s" % (key , self .settings [key ]))
1509
+ if is_verbose :
1510
+ print (" %s" % self .settings_help [key ])
1511
+
1512
+ return
1513
1513
1514
1514
if setting not in self .settings :
1515
1515
raise UsageError (_ ('Unknown setting %s. Try "pragma list".' )
@@ -1720,8 +1720,8 @@ def do_security(self, args):
1720
1720
for p in permission .properties :
1721
1721
if p in class_props :
1722
1722
continue
1723
- else :
1724
- bad_props .append (p )
1723
+
1724
+ bad_props .append (p )
1725
1725
if bad_props :
1726
1726
sys .stdout .write (_ (
1727
1727
'\n **Invalid properties for %(class)s: '
@@ -2012,8 +2012,7 @@ def run_command(self, args):
2012
2012
2013
2013
if command in ['genconfig' , 'templates' ]:
2014
2014
try :
2015
- ret = function (args [1 :])
2016
- return ret
2015
+ return function (args [1 :])
2017
2016
except UsageError as message :
2018
2017
return self .usageError_feedback (message , function )
2019
2018
@@ -2135,7 +2134,7 @@ def main(self): # noqa: PLR0912, PLR0911
2135
2134
self .print_designator = 0
2136
2135
self .verbose = 0
2137
2136
for opt , arg in opts :
2138
- if opt == '-h' :
2137
+ if opt == '-h' : # noqa: RET505 - allow elif after returns
2139
2138
self .usage ()
2140
2139
return 0
2141
2140
elif opt == '-v' :
0 commit comments