Skip to content

Commit

Permalink
Fix all "F811 Redefinition of unused"
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Apr 21, 2023
1 parent e05d130 commit a29b835
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 80 deletions.
2 changes: 1 addition & 1 deletion Pythonwin/pywin/Demos/app/basictimerapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import win32api
import win32con
import win32ui
from pywin.framework import app, cmdline, dlgappcore
from pywin.framework import cmdline, dlgappcore


class TimerAppDialog(dlgappcore.AppDialog):
Expand Down
2 changes: 0 additions & 2 deletions Pythonwin/pywin/Demos/demoutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ def NeedApp():
win32ui.MessageBox("Error executing command - %s" % (details), "Demos")


from pywin.framework.app import HaveGoodGUI

if __name__ == "__main__":
import demoutils

Expand Down
2 changes: 0 additions & 2 deletions Pythonwin/pywin/Demos/ocx/demoutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ def NeedApp():
win32ui.MessageBox("Error executing command - %s" % (details), "Demos")


from pywin.framework.app import HaveGoodGUI

if __name__ == "__main__":
from . import demoutils

Expand Down
1 change: 0 additions & 1 deletion Pythonwin/pywin/framework/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


def ParseArgs(str):
import string

ret = []
pos = 0
Expand Down
1 change: 0 additions & 1 deletion Pythonwin/pywin/framework/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def ListAllHelpFiles():

def _ListAllHelpFilesInRoot(root):
"""Returns a list of (helpDesc, helpFname) for all registered help files"""
import regutil

retList = []
try:
Expand Down
2 changes: 0 additions & 2 deletions Pythonwin/pywin/framework/stdin.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,4 @@ def fake_raw_input(prompt=None):
finally:
get_input_line = raw_input
else:
import sys

sys.stdin = Stdin()
29 changes: 0 additions & 29 deletions adodbapi/test/dbapi20.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,35 +804,6 @@ def help_nextset_tearDown(self, cur):
raise NotImplementedError("Helper not implemented")
# cur.execute("drop procedure deleteme")

def test_nextset(self):
con = self._connect()
try:
cur = con.cursor()
if not hasattr(cur, "nextset"):
return

try:
self.executeDDL1(cur)
sql = self._populate()
for sql in self._populate():
cur.execute(sql)

self.help_nextset_setUp(cur)

cur.callproc("deleteme")
numberofrows = cur.fetchone()
assert numberofrows[0] == len(self.samples)
assert cur.nextset()
names = cur.fetchall()
assert len(names) == len(self.samples)
s = cur.nextset()
assert s == None, "No more return sets, should return None"
finally:
self.help_nextset_tearDown(cur)

finally:
con.close()

def test_nextset(self):
raise NotImplementedError("Drivers need to override this test")

Expand Down
2 changes: 0 additions & 2 deletions com/win32com/test/testAccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ def test(dbname=None):


if __name__ == "__main__":
import sys

from .util import CheckClean

dbname = None
Expand Down
3 changes: 0 additions & 3 deletions com/win32comext/authorization/demos/EditSecurity.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import win32con
import win32security
from ntsecuritycon import (
CONTAINER_INHERIT_ACE,
FILE_ALL_ACCESS,
FILE_APPEND_DATA,
FILE_GENERIC_EXECUTE,
Expand All @@ -19,8 +18,6 @@
FILE_WRITE_ATTRIBUTES,
FILE_WRITE_DATA,
FILE_WRITE_EA,
INHERIT_ONLY_ACE,
OBJECT_INHERIT_ACE,
PSPCB_SI_INITDIALOG,
READ_CONTROL,
SI_ACCESS_CONTAINER,
Expand Down
3 changes: 0 additions & 3 deletions com/win32comext/authorization/demos/EditServiceSecurity.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
SERVICE_GENERIC_WRITE = win32service.SERVICE_CHANGE_CONFIG

from ntsecuritycon import (
CONTAINER_INHERIT_ACE,
INHERIT_ONLY_ACE,
OBJECT_INHERIT_ACE,
PSPCB_SI_INITDIALOG,
READ_CONTROL,
SI_ACCESS_CONTAINER,
Expand Down
1 change: 0 additions & 1 deletion com/win32comext/axdebug/Test/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def _GetCodeContainer(self):
codeText = open(self.module.__file__, "rt").read()
except IOError as details:
codeText = "# Exception opening file\n# %s" % (details)
from win32com.axdebug import codecontainer

self.codeContainer = codecontainer.SourceCodeContainer(
codeText, self.module.__file__
Expand Down
2 changes: 0 additions & 2 deletions com/win32comext/axdebug/codecontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ def GetName(self, dnt):


if __name__ == "__main__":
import sys

sys.path.append(".")
import ttest

Expand Down
2 changes: 0 additions & 2 deletions com/win32comext/axscript/client/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
from win32com.server.exception import COMException
from win32com.util import IIDToInterfaceName

from .framework import trace

try:
os.environ["DEBUG_AXDEBUG"]
debuggingTrace = 1 # Should we print "trace" output?
Expand Down
13 changes: 0 additions & 13 deletions com/win32comext/shell/demos/ITransferAdviseSink.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
)


def decode_flags(flags):
if flags == 0:
return "TSF_NORMAL"
flag_txt = ""
for k, v in tsf_flags:
if flags & v:
if flag_txt:
flag_txt = flag_txt + "|" + k
else:
flag_txt = k
return flag_txt


TRANSFER_ADVISE_STATES = {}
for k, v in list(shellcon.__dict__.items()):
if k.startswith("TS_"):
Expand Down
1 change: 0 additions & 1 deletion win32/Demos/service/pipeTestServiceClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def stressTestClient(server, numThreads, numMessages):

def main():
import getopt
import sys

server = "."
thread_count = 0
Expand Down
2 changes: 0 additions & 2 deletions win32/Lib/win32rcparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,6 @@ def GenerateFrozenResource(rc_name, output_name, h_name=None):
print("See test_win32rcparser.py, and the win32rcparser directory (both")
print("in the test suite) for an example of this module's usage.")
else:
import pprint

filename = sys.argv[1]
if "-v" in sys.argv:
RCParser.debugEnabled = 1
Expand Down
12 changes: 0 additions & 12 deletions win32/Lib/winnt.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,6 @@ def SORTIDFROMLCID(lcid):
return (WORD)((((DWORD)(lcid)) & NLS_VALID_LOCALE_MASK) >> 16)


def UNREFERENCED_PARAMETER(P):
return P


def DBG_UNREFERENCED_PARAMETER(P):
return P


def DBG_UNREFERENCED_LOCAL_VARIABLE(V):
return V


def UNREFERENCED_PARAMETER(P):
return

Expand Down
1 change: 0 additions & 1 deletion win32/scripts/regsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ def RegisterShellInfo(searchPaths):
if not len(searchPaths):
raise error("-c option must provide at least one additional path")
import regutil
import win32api

currentPaths = regutil.GetRegisteredNamedPath(None).split(";")
oldLen = len(currentPaths)
Expand Down

0 comments on commit a29b835

Please sign in to comment.