-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Fix docstring markup in sage/categories #34168
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
I don't understand this one:
The relevant lines seem to be
but I don't know what's wrong with that. |
Branch: u/jhpalmieri/categories-docfixes |
Commit: |
comment:4
So far this branch addresses the other issues, but not New commits:
|
comment:5
exact same issue for me, as I tried without seing that you did the job alreay |
comment:7
Not sure about this change (and similar changes) on the branch:
I think we would want to keep the parentheses there.
work? |
comment:8
I'm not sure what you mean by "work". I believe that all of those changes are in underscore methods and so by default do not appear in the reference manual. If I use
then the output from
I can't successfully build the docs with underscore methods included, so it's hard to test more broadly. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
Okay, here is markup that I hope will make everyone happy. |
comment:11
Back to the diff --git a/src/sage/categories/category_with_axiom.py b/src/sage/categories/category_with_axiom.py
index 237ad5dfed..302902a5e5 100644
--- a/src/sage/categories/category_with_axiom.py
+++ b/src/sage/categories/category_with_axiom.py
@@ -749,7 +749,7 @@ The infrastructure would then be in charge of building the appropriate
arborescence under the hood. Or rely on some database (see discussion
on :trac:`10963`, in particular at the end of comment 332).
-Axioms defined upon other axioms
+axioms defined upon other axioms
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sometimes an axiom can only be defined when some other axiom Can anyone explain this? A bug in flake8? |
comment:12
We could skip this file, but I would prefer if we could understand and solve the problem. |
comment:13
Maybe the issue is that "Axioms" is the title of the file: the file starts
If I change that to "Axiom" or "AXIOMS", the problem goes away. Maybe diff --git a/src/sage/categories/category_with_axiom.py b/src/sage/categories/category_with_axiom.py
index 237ad5dfed..665a303166 100644
--- a/src/sage/categories/category_with_axiom.py
+++ b/src/sage/categories/category_with_axiom.py
@@ -1,5 +1,5 @@
r"""
-Axioms
+Axioms for categories
This documentation covers how to implement axioms and proceeds with an
overview of the implementation of the axiom infrastructure. It assumes although I don't really like the idea of having to work around other people's bugs. |
comment:14
This bug seems to strike whenever
It doesn't seem to mind if the title word appears by itself on another line. If the title is "Axioms", then a line starting "Axioms are" will cause an error but a line containing just "Axioms" is fine. |
comment:15
A single-word first line seems to match the regex in |
comment:16
Replying to @mkoeppe:
I am fairly opposed to those parentheses; they are unnatural to me. I think we should simply remove them. If we decided we want them to be there, we should use the |
comment:17
Replying to @mkoeppe:
So they should perhaps make the change |
comment:18
Yes, that would be a simple fix. I have isolated a testcase:
gets transformed to:
which causes the error. |
comment:19
Yes, good catch, I think that's the problem. I've opened peterjc/flake8-rst-docstrings#65. With the proposed change, |
Author: John Palmieri |
comment:20
I'm leaving |
comment:21
Replying to @jhpalmieri:
Thanks, looking good. |
comment:22
Replying to @tscrim:
The parentheses, indicating that it's talking about the unique instance, not the class, seem to be used very widely in this context, as
That's what the current branch does. |
Reviewer: Matthias Koeppe |
comment:24
Thanks! |
Changed branch from u/jhpalmieri/categories-docfixes to |
Part of #34157:
CC: @mkoeppe @tscrim
Component: documentation
Author: John Palmieri
Branch/Commit:
80d7f8f
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/34168
The text was updated successfully, but these errors were encountered: