Modify ↓
Ticket #268 (closed defect: fixed)
Unused variables in source
| Reported by: | Leo | Owned by: | andrew |
|---|---|---|---|
| Priority: | major | Milestone: | 0.6.2 |
| Component: | commands | Version: | 0.6.1 |
| Keywords: | Cc: |
Description
Pulling up the code in PyDev? reveals a bunch of unused variables:
| Description | Resource | Path | Location | Type |
| Unused variable: cursor | db.py | /south/tests | line 73 | PyDev? Problem |
| Unused variable: e | migration.py | /south | line 103 | PyDev? Problem |
| Unused variable: fdef | startmigration.py | /south/management/commands | line 306 | PyDev? Problem |
| Unused variable: fdef | startmigration.py | /south/management/commands | line 452 | PyDev? Problem |
| Unused variable: field_definition | startmigration.py | /south/management/commands | line 372 | PyDev? Problem |
| Unused variable: field_definition | startmigration.py | /south/management/commands | line 418 | PyDev? Problem |
| Unused variable: i | startmigration.py | /south/management/commands | line 135 | PyDev? Problem |
| Unused variable: name | pyodbc.py | /south/db/sql_server | line 117 | PyDev? Problem |
| Unused variable: name | sqlite3.py | /south/db | line 46 | PyDev? Problem |
| Unused variable: q_name | pyodbc.py | /south/db/sql_server | line 42 | PyDev? Problem |
| Unused variable: q_name | pyodbc.py | /south/db/sql_server | line 63 | PyDev? Problem |
| Unused variable: q_table_name | pyodbc.py | /south/db/sql_server | line 42 | PyDev? Problem |
| Unused variable: q_table_name | pyodbc.py | /south/db/sql_server | line 63 | PyDev? Problem |
| Unused variable: qn | generic.py | /south/db | line 506 | PyDev? Problem |
| Unused variable: target | migration.py | /south | line 465 | PyDev? 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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

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).