Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: scripts/v.report/v.report.py:fixed F841 local variable 'numcols' is assigned to but never used #1609

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ per-file-ignores =
scripts/r.in.wms/srs.py: E722
scripts/r.semantic.label/r.semantic.label.py: E501
scripts/v.report/v.report.py: E721
scripts/db.out.ogr/db.out.ogr.py: F841
scripts/g.extension/g.extension.py: F841, E722, E501
scripts/v.unpack/v.unpack.py: E722, E501
scripts/v.import/v.import.py: E722, E501
Expand Down
2 changes: 1 addition & 1 deletion scripts/db.out.ogr/db.out.ogr.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def main():
layer = options["layer"]
format = options["format"]
output = options["output"]
table = options["table"]
table = options["table"] # noqa: F841
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that it is unused looks like a bug. Can you please check the rest of the code to see if it is potentially missing anywhere (like parameter for another module or something like layer is used instead of it in an SQL expression? Alternatively, you can just leave this out for this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at it and this looks like option table was never used, so I think we should remove it in a separate PR. It would sort of break backwards compatibility, but if the option was never used, I assume it would be fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
table = options["table"] # noqa: F841
table = options["table"]


if format.lower() == "dbf":
format = "ESRI_Shapefile"
Expand Down
Loading