Ticket #268 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Unused variables in source

Reported by: Leo Owned by: andrew
Priority: major Milestone: 0.6.2
Component: commands Version: 0.6.1
Keywords: Cc:


Pulling up the code in PyDev? reveals a bunch of unused variables:

Unused variable: cursordb.py/south/testsline 73PyDev? Problem
Unused variable: emigration.py/southline 103PyDev? Problem
Unused variable: fdefstartmigration.py/south/management/commandsline 306PyDev? Problem
Unused variable: fdefstartmigration.py/south/management/commandsline 452PyDev? Problem
Unused variable: field_definitionstartmigration.py/south/management/commandsline 372PyDev? Problem
Unused variable: field_definitionstartmigration.py/south/management/commandsline 418PyDev? Problem
Unused variable: istartmigration.py/south/management/commandsline 135PyDev? Problem
Unused variable: namepyodbc.py/south/db/sql_serverline 117PyDev? Problem
Unused variable: namesqlite3.py/south/dbline 46PyDev? Problem
Unused variable: q_namepyodbc.py/south/db/sql_serverline 42PyDev? Problem
Unused variable: q_namepyodbc.py/south/db/sql_serverline 63PyDev? Problem
Unused variable: q_table_namepyodbc.py/south/db/sql_serverline 42PyDev? Problem
Unused variable: q_table_namepyodbc.py/south/db/sql_serverline 63PyDev? Problem
Unused variable: qngeneric.py/south/dbline 506PyDev? Problem
Unused variable: targetmigration.py/southline 465PyDev? Problem

Some of these are intentional but I suspect a few might be bugs - for example the ones in pyodbc.py it looks like you should be using the q_table_name values in the SQL queries in those function.

Change History

comment:1 Changed 6 years ago by andrew

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.6.2

There are a few; I've looked through that list and removed ones that are still at the given line and which aren't part of a patternmatch-unpack, or just [something for i in range()].

The pyodbc ones do look suspicious - it might be that the ' around the %s are actually doing good-enough-for-most-people-but-will-cause-bugs-eventually quoting; I'll pass that onto the original author of that module (the guy who sits next to me at work).

Note: See TracTickets for help on using tickets.