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

get rid of unused variables in algebra #33732

Closed
fchapoton opened this issue Apr 19, 2022 · 11 comments
Closed

get rid of unused variables in algebra #33732

fchapoton opened this issue Apr 19, 2022 · 11 comments

Comments

@fchapoton
Copy link
Contributor

found using pylint W0612

CC: @tscrim @slel @kliem @kwankyu

Component: algebra

Author: Frédéric Chapoton

Branch/Commit: 7750e08

Reviewer: Kwankyu Lee

Issue created by migration from https://trac.sagemath.org/ticket/33732

@fchapoton fchapoton added this to the sage-9.6 milestone Apr 19, 2022
@fchapoton
Copy link
Contributor Author

Commit: 41aae79

@fchapoton
Copy link
Contributor Author

Branch: u/chapoton/33732

@fchapoton
Copy link
Contributor Author

New commits:

41aae79get rid of unused variables in algebra (pylint W0612)

@fchapoton
Copy link
Contributor Author

comment:2

green bot, so please review

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 24, 2022

comment:3

Maybe these too:

diff --git a/src/sage/algebras/free_algebra_quotient_element.py b/src/sage/algebras/free_algebra_quotient_element.py
index b76538c338..c841a9210c 100644
--- a/src/sage/algebras/free_algebra_quotient_element.py
+++ b/src/sage/algebras/free_algebra_quotient_element.py
@@ -243,7 +243,7 @@ class FreeAlgebraQuotientElement(AlgebraElement):
 
         def monomial_product(X, w, m):
             mats = X._FreeAlgebraQuotient__matrix_action
-            for (j, k) in m._element_list:
+            for j, k in m._element_list:
                 M = mats[int(j)]
                 for _ in range(k):
                     w *= M
diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py
index bbdab484b4..3bde7b2153 100644
--- a/src/sage/algebras/quatalg/quaternion_algebra.py
+++ b/src/sage/algebras/quatalg/quaternion_algebra.py
@@ -798,7 +798,7 @@ class QuaternionAlgebra_ab(QuaternionAlgebra_abstract):
         e_new_gens = []
 
         # For each prime at which R is not yet maximal, make it bigger
-        for (p, _) in d_R.factor():
+        for p, _ in d_R.factor():
             e = R.basis()
             while self.quaternion_order(e).discriminant().valuation(p) > d_A.valuation(p):
                 # Compute a normalized basis at p

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 24, 2022

Changed commit from 41aae79 to 7750e08

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 24, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

baeb43eMerge branch 'u/chapoton/33732' in 9.6.rc1
7750e08details

@fchapoton
Copy link
Contributor Author

comment:5

done

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 25, 2022

Reviewer: Kwankyu Lee

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 25, 2022

comment:6

Thanks.

@vbraun
Copy link
Member

vbraun commented May 24, 2022

Changed branch from u/chapoton/33732 to 7750e08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants