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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix E228 then E225 in rings/ #36192

Merged
merged 2 commits into from
Sep 10, 2023
Merged

Conversation

fchapoton
Copy link
Contributor

fix pycodestyle warnings E228 and E225 in rings

done using autopep8

馃摑 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.

@dcoudert
Copy link
Contributor

dcoudert commented Sep 4, 2023

Have you checked possible conflicts with #36152 ?

@@ -238,7 +238,7 @@ def list(self):
v = [D.hom([r], codomain=C, check=False) for r in roots]
else:
v = []
return Sequence(v, universe=self, check=False, immutable=True, cr=v!=[])
return Sequence(v, universe=self, check=False, immutable=True, cr=v != [])

Copy link
Collaborator

Choose a reason for hiding this comment

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

cr=(v != []) or cr=(v!=[])may be better than inserting spaces.

@@ -519,7 +519,7 @@ def list(self):
C = self.codomain()
D_abs = D.absolute_field('a')
v = [self(f, check=False) for f in D_abs.Hom(C).list()]
return Sequence(v, universe=self, check=False, immutable=True, cr=v!=[])
return Sequence(v, universe=self, check=False, immutable=True, cr=v != [])

Copy link
Collaborator

Choose a reason for hiding this comment

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

The same here.

else:
if D == C:
w = z
else:
w = C.zeta(n)
v = [self([w**k], check=False) for k in Zmod(n) if k.is_unit()]
return Sequence(v, universe=self, check=False, immutable=True, cr=v!=[])
return Sequence(v, universe=self, check=False, immutable=True, cr=v != [])
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same here.

@@ -463,7 +463,7 @@ def subfields(self, degree=0, name=None):
if to_K is not None:
to_K = RelativeNumberFieldHomomorphism_from_abs(self.Hom(K), to_K*to_abs)
ans.append((K, from_K, to_K))
ans = Sequence(ans, immutable=True, cr=ans!=[])
ans = Sequence(ans, immutable=True, cr=ans != [])
return ans
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same comment above.

@@ -2077,7 +2077,7 @@ def embeddings(self, K):
# then it is most natural, so we put it first.
put_natural_embedding_first(v)

self.__embeddings[K] = Sequence(v, cr=v!=[], immutable=True, check=False, universe=self.Hom(K))
self.__embeddings[K] = Sequence(v, cr=v != [], immutable=True, check=False, universe=self.Hom(K))
return self.__embeddings[K]
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same here.

@kwankyu
Copy link
Collaborator

kwankyu commented Sep 5, 2023

Otherwise, lgtm.

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

Documentation preview for this PR (built with commit 39dfddd; changes) is ready! 馃帀

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

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

Thanks.

@vbraun vbraun merged commit 15a0566 into sagemath:develop Sep 10, 2023
12 of 13 checks passed
@mkoeppe mkoeppe added this to the sage-10.2 milestone Sep 10, 2023
@fchapoton fchapoton deleted the E228_E225_in_rings branch September 11, 2023 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants