Ticket #2842 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

[with patch, positive review] PyLint unused variable cleanup for sage.rings.polynomial

Reported by: malb Owned by: cwitty
Priority: minor Milestone: sage-3.0
Component: misc Keywords: pylint
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

The attached patch

  • removes unused variables,
  • removes unused imports,
  • defines undefined variables,

from several files in sage.rings.polynomial. It doesn't fix all issues in that module but this patch is still open for reviews.

Attachments

pylint_polynomial_unused.patch Download (22.9 KB) - added by malb 5 years ago.
2842.patch Download (22.9 KB) - added by mhansen 5 years ago.

Change History

Changed 5 years ago by malb

Changed 5 years ago by mhansen

comment:1 Changed 5 years ago by mhansen

  • Summary changed from [with patch, needs review] PyLint unused variable cleanup for sage.rings.polynomial to [with patch, positive review] PyLint unused variable cleanup for sage.rings.polynomial

Looks good to me. Apply just 2842.patch after #2844 .

comment:2 Changed 5 years ago by mabshoff

  • Summary changed from [with patch, positive review] PyLint unused variable cleanup for sage.rings.polynomial to [with patch, positive review, pending fixes] PyLint unused variable cleanup for sage.rings.polynomial

I am seeing one doctest failure on sage.math:

sage -t -long devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx
**********************************************************************
File "/scratch/mabshoff/release-cycle/sage-3.0.alpha3/tmp/multi_polynomial_libsingular.py", line 496:
    sage: R.<x,y> = QQ[]; S.<xx,yy> = GF(5)[]; S(5*x*y + x + 17*y)
Expected:
    xx + 2*yy
Got:
    xx + 0*yy
**********************************************************************

Martin will start poking around tomorrow.

Cheers,

Michael

comment:3 Changed 5 years ago by mabshoff

Note that post the #2844 merge you ought to apply 2842.patch.

Cheers,

Michael

comment:4 Changed 5 years ago by mabshoff

  • Summary changed from [with patch, positive review, pending fixes] PyLint unused variable cleanup for sage.rings.polynomial to [with patch, positive review] PyLint unused variable cleanup for sage.rings.polynomial

Oh well, just applying #2844 causes the above libSingular failures. So I am merging this patch since it works. I would recommend opening another ticket once somebody else can verify the same issue I see. A compile from scratch on sage.math ought to lead to the same result.

Cheers,

Michael

comment:5 Changed 5 years ago by mabshoff

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

Merged 2842.patch in Sage 3.0.alpha3

Note: See TracTickets for help on using tickets.