Skip to content

fix ruff SIM101 in Witt vectors and rings #40256

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

fchapoton
Copy link
Contributor

This is about simpler way to use isinstance.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have created tests covering the changes.

Copy link

Documentation preview for this PR (built with commit 53509b8; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@r-mb
Copy link
Contributor

r-mb commented Jun 15, 2025

Oh, merci, je ne savais pas que l'on pouvait écrire les isinstance de cette manière, c'est bien plus agréable de la sorte !
Est-ce ruff qui t'a signalé ça, ou est-ce en parcourant le code ? Histoire que je fasse les tests en amont de mes prochaines PR.

À la limite, j'écrirais "characteristic" en toutes lettres plutôt que "char." (merci d'avoir repéré l'oubli !). Mais comme il s'agit des goûts et les couleurs je ne vois pas de problème à ce que cela reste tel quel.

@r-mb
Copy link
Contributor

r-mb commented Jun 15, 2025

Looks good to me, the test failure is unrelated to this PR, and is a issue which already has a ticket.

@fchapoton
Copy link
Contributor Author

merci. J'ai utilisé ruff check --select=SIM101 src/sage et comme j'avais déjà réparé partout ailleurs, c'était les seuls fichiers avec des erreurs.

@r-mb
Copy link
Contributor

r-mb commented Jun 15, 2025

D'accord, merci ! À terme, cette option sera-t-elle ajoutée à sage/src/rox.ini ? J'ai employé sage -tox -e ruff-minimal -- $FICHIER pendant que j'ai écrit ces fichiers. Mais il n'y a pas de tests pour SIM101.

vbraun pushed a commit to vbraun/sage that referenced this pull request Jun 17, 2025
sagemathgh-40256: fix ruff SIM101 in Witt vectors and rings
    
This is about simpler way to use isinstance.

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have created tests covering the changes.
    
URL: sagemath#40256
Reported by: Frédéric Chapoton
Reviewer(s): Rubén Muñoz--Bertrand
vbraun pushed a commit to vbraun/sage that referenced this pull request Jun 18, 2025
sagemathgh-40256: fix ruff SIM101 in Witt vectors and rings
    
This is about simpler way to use isinstance.

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have created tests covering the changes.
    
URL: sagemath#40256
Reported by: Frédéric Chapoton
Reviewer(s): Rubén Muñoz--Bertrand
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.

2 participants