update CI workflows: update/fix codecheck; remove Ubuntu 18.04 (#1167)

1. update/fix codecheck

Run workflow with pylint 2.15.7

Add a  bunch of fiddly and mostly cosmetic changes to
make pylint (and make codecheck) happy.

Also try to run pyflakes3 vs. pyflakes

2. remove Ubuntu 18.04

Ubuntu 18.04 has been removed from github actions, so
we remove it from our workflow as well
This commit is contained in:
lantz
2023-04-21 17:37:09 -07:00
committed by GitHub
parent 1169982c0a
commit cf5675876c
22 changed files with 142 additions and 129 deletions
+8 -7
View File
@@ -69,7 +69,10 @@ class Console( Frame ):
self.bindEvents()
self.sendCmd( 'export TERM=dumb' )
self.outputHook = None
def outputHook( _obj, _text):
return True
self.outputHook = outputHook
def makeWidgets( self ):
"Make a label, a text area, and a scroll bar."
@@ -111,10 +114,8 @@ class Console( Frame ):
self.text.insert( 'end', text )
self.text.mark_set( 'insert', 'end' )
self.text.see( 'insert' )
outputHook = lambda x, y: True # make pylint happier
if self.outputHook:
outputHook = self.outputHook
outputHook( self, text )
if callable( self.outputHook ):
self.outputHook( self, text )
def handleKey( self, event ):
"If it's an interactive command, send it to the node."
@@ -294,10 +295,10 @@ class ConsoleApp( Frame ):
'switches': 'Switch',
'controllers': 'Controller'
}
for name in titles:
for name, title in titles.items():
nodes = getattr( net, name )
frame, consoles = self.createConsoles(
cframe, nodes, width, titles[ name ] )
cframe, nodes, width, title )
self.consoles[ name ] = Object( frame=frame, consoles=consoles )
self.selected = None
self.select( 'hosts' )