Skip to content

Conversation

fchapoton
Copy link
Contributor

Small changes in the modified files, about pep8 and ruff warnings about code

📝 Checklist

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

@enriqueartal
Copy link
Contributor

There is a related PR #36768 with more changes in this file and with changes in some other files. A merge?

Copy link

Documentation preview for this PR (built with commit bdf89ec; changes) is ready! 🎉

enriqueartal added a commit to enriqueartal/sage that referenced this pull request Feb 11, 2024
Copy link
Contributor

@grhkm21 grhkm21 left a comment

Choose a reason for hiding this comment

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

Since your PR focuses on details / Pythonic changes, I suggested some too, but they are optional. Otherwise, looks good to me.

Comment on lines -1318 to 1322
if len(A1) == 0:
if not A1:
b = B.one()
else:
b = prod(A1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe you can make this b = prod(A1, B.one()).

Comment on lines 1379 to +1383
br1 = B0.delta()**r * B0(prod(B0(_) for _ in br0_left[1:]))
cox = prod(F0.gens())
U0 = [cox**q * (f0 * br1) / cox**q / f0 for f0 in F0.gens()[:-1]]
U = [tuple(sign(k1)*(abs(k1) + k) for k1 in _.Tietze()) for _ in U0]
pasos = [B.one()] + [_ for _ in reversed(L1)]
U = [tuple(sign(k1) * (abs(k1) + k) for k1 in _.Tietze()) for _ in U0]
pasos = [B.one()] + list(reversed(L1))
Copy link
Contributor

Choose a reason for hiding this comment

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

- br1 = B0.delta()**r * B0(prod(B0(_) for _ in br0_left[1:]))
+ br1 = B0.delta()**r * prod(map(B0, br0_left[1:]), B0.one())

Also, do you mind renaming _ to say br or something sensible? Variable names shouldn't start with underscores if they are used.

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 18, 2024
sagemathgh-37281: details in Zariski-Van-Kampen
    
Small changes in the modified files, about pep8 and ruff warnings about
code

### 📝 Checklist

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
    
URL: sagemath#37281
Reported by: Frédéric Chapoton
Reviewer(s): grhkm21, Martin Rubey
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 19, 2024
sagemathgh-37281: details in Zariski-Van-Kampen
    
Small changes in the modified files, about pep8 and ruff warnings about
code

### 📝 Checklist

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
    
URL: sagemath#37281
Reported by: Frédéric Chapoton
Reviewer(s): grhkm21, Martin Rubey
@vbraun vbraun merged commit 9a1a964 into sagemath:develop Feb 25, 2024
@fchapoton fchapoton deleted the zariski-vk branch February 25, 2024 12:27
@mantepse mantepse mentioned this pull request May 10, 2024
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.

6 participants