13
0

wscript: drop unused imports, scripted

Done with ad hoc scripting hacks processing unused imports found by pyflakes:

for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Logs.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^import waflib.Logs as Logs,/import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/import waflib.Options as Options, /import /g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^from waflib import Options,/from waflib import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep ' imported but unused$' | sed "s/^\([^:]*\):[0-9]*:[0-9]* '\(.*\)'.*/\1 \2/g" | while read f lib; do sed -i "/^import $lib$/d" $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import Options$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.TaskGen.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import TaskGen$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Task.Task.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Task import Task$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Tools.winres.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Tools import winres$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Utils.* but unused' | cut -d: -f1 | while read f; do sed -i '/^import waflib.Utils as Utils$/d' $f; done
This commit is contained in:
Mads Kiilerich 2022-04-09 15:17:54 +02:00 committed by Paul Davis
parent 9aaf5d2c8c
commit 7737c17d52
45 changed files with 10 additions and 118 deletions

View File

@ -3,15 +3,10 @@ from waflib.extras import autowaf as autowaf
from waflib import Options, TaskGen
import waflib.Logs as Logs, waflib.Utils as Utils
import os
import shutil
import sys
import re
import time
from waflib.Task import Task
from waflib.Tools import winres
import subprocess
import glob
import copy
# Mandatory variables
top = '.'

View File

@ -1,13 +1,7 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options, TaskGen
import waflib.Logs as Logs, waflib.Utils as Utils
import os
import shutil
import sys
import re
import time
from waflib.Task import Task
# Mandatory variables
top = '.'

View File

@ -2,10 +2,7 @@
from waflib.extras import autowaf as autowaf
from waflib import Options, Task, Tools
import os
import sys
import re
import subprocess
import sys
# default state file version for this build
CURRENT_SESSION_FILE_VERSION = 7002

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
AUDIOGRAPHER_VERSION = '0.0.0'

View File

@ -1,8 +1,6 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import TaskGen
import os
import sys
# Mandatory variables
top = '.'

View File

@ -1,8 +1,6 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
import sys
import re
I18N_PACKAGE = 'alsa-backend'

View File

@ -2,8 +2,6 @@
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import sys
import re
I18N_PACKAGE = 'coreaudio-backend'

View File

@ -1,8 +1,6 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
import sys
import re
I18N_PACKAGE = 'dummy-backend'

View File

@ -1,9 +1,6 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import sys
import re
I18N_PACKAGE = 'portaudio-backend'

View File

@ -1,8 +1,6 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
import sys
import re
I18N_PACKAGE = 'pulse-backend'

View File

@ -1,9 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import sys
import re
# Mandatory variables
top = '.'

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
from waflib import TaskGen
import os
# Version of this package (even if built as a child)

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
# Mandatory variables
top = '.'

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
# Mandatory variables
top = '.'

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
# Mandatory variables
top = '.'

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import TaskGen
import os
import sys
# Version of this package (even if built as a child)
MAJOR = '2'

View File

@ -1,13 +1,8 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options, TaskGen
import waflib.Logs as Logs, waflib.Utils as Utils
import os
import shutil
import sys
import re
import time
from waflib.Task import Task
# Mandatory variables
top = '.'

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import sys
import platform as PLATFORM
# Version of this package (even if built as a child)
MAJOR = '0'

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import re
import sys

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import TaskGen
import os
import sys
# Version of this package (even if built as a child)
MAJOR = '1'

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import TaskGen
import os
import sys
# Variables for 'waf dist'
APPNAME = 'liblua'

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import sys
# Version of this package (even if built as a child)
MAJOR = '2'

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
# Mandatory variables
top = '.'

View File

@ -2,7 +2,6 @@
from waflib.extras import autowaf as autowaf
from waflib import Options
from waflib import TaskGen
import os
import sys
# Version of this package (even if built as a child)

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
import os
import re
import shutil
import waflib.extras.autowaf as autowaf
import waflib.Options as Options, waflib.Utils as Utils
import waflib.Utils as Utils
# Mandatory variables
top = '.'

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
import os
import re
import shutil
import waflib.extras.autowaf as autowaf
import waflib.Options as Options, waflib.Utils as Utils
import waflib.Utils as Utils
# Mandatory variables
top = '.'

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
import os
import re
import shutil
import waflib.extras.autowaf as autowaf
import waflib.Options as Options, waflib.Utils as Utils
import waflib.Utils as Utils
# Mandatory variables
top = '.'

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
import os
import re
import shutil
import waflib.extras.autowaf as autowaf
import waflib.Options as Options, waflib.Utils as Utils
import waflib.Utils as Utils
# Mandatory variables
top = '.'

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
import os
import re
import shutil
import waflib.extras.autowaf as autowaf
import waflib.Options as Options, waflib.Utils as Utils
import waflib.Utils as Utils
# Mandatory variables
top = '.'

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
import os
import re
import shutil
import waflib.extras.autowaf as autowaf
import waflib.Options as Options, waflib.Utils as Utils
import waflib.Utils as Utils
# Mandatory variables
top = '.'

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
import os
import re
import shutil
import waflib.extras.autowaf as autowaf
import waflib.Options as Options, waflib.Utils as Utils
import waflib.Utils as Utils
# Mandatory variables
top = '.'

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
LIBPTFORMAT_VERSION = '0.0.0'

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
QM_DSP_VERSION = '1.7.1'

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
# Mandatory variables

View File

@ -1,8 +1,6 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import TaskGen
import os
import sys
# Mandatory variables
top = '.'

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
from waflib import TaskGen
import os
# Version of this package (even if built as a child)
MAJOR = '0'

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
from waflib import TaskGen
import os
# Version of this package (even if built as a child)
MAJOR = '0'

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
from waflib import TaskGen
import os
# Version of this package (even if built as a child)
MAJOR = '4'

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
from waflib import TaskGen
import os
# Version of this package (even if built as a child)
MAJOR = '1'

View File

@ -1,13 +1,8 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options, TaskGen
import waflib.Logs as Logs, waflib.Utils as Utils
import waflib.Utils as Utils
import os
import shutil
import sys
import re
import time
from waflib.Task import Task
top = '.'
out = 'build'

View File

@ -1,13 +1,8 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options, TaskGen
import waflib.Logs as Logs, waflib.Utils as Utils
import waflib.Utils as Utils
import os
import shutil
import sys
import re
import time
from waflib.Task import Task
# Mandatory variables
top = '.'

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
import waflib.Logs as Logs, waflib.Utils as Utils
import waflib.Utils as Utils
import os
# Mandatory variables

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import re
import sys

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
# Mandatory variables
top = '.'

View File

@ -3,11 +3,9 @@ from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import re
import string
import subprocess
import sys
import platform as PLATFORM
from waflib.Tools import winres
from waflib.Build import Context
from waflib.Build import BuildContext
import waflib.Utils as Utils