Comments (5)
(by exarkun)
from pydoctor.
(by mwhudson)
Ah. I think I know what's happening here: it's pydoctor's hackish way of extracting a summary line. For the table of contents, pydoctor takes the first non-blank line of ths docstring. In this case it's just "B{foo", which is unsurprisingly an error. It works fine for formatting the main docstring.
Not sure what to do about this.
from pydoctor.
(by rich-noir)
Just ran into the same problem. Took a bit to track down what the problem actually is as the line numbers on the error message are useless.
Just knowing that it's the first line is helpful. I'd noticed truncation but hadn't yet twigged to it being the first line.
I can work around that.
from pydoctor.
(by mwhudson)
Hm, the line numbers shouldn't be useless -- can you file a separate bug about that?
Ideas for better summary-extracting heuristics would be good. I think there is some mileage in taking the content up to the first blank line, unless that gets you more than say 200 characters, in which case you drop back to what we do know. Or you could try to do the truncation by processing the fully rendered complete docstring -- take the first paragraph level element or something. Or you could add some options to control this, but I don't really like this idea.
There's never going to be a clean answer for this.
from pydoctor.
(by mwhudson)
I think the way pydoctor extracts summaries now is much less likely to hit this problem, so closing.
from pydoctor.
Related Issues (20)
- Fix compatibility with docutils 0.21.x
- Transform deprecated typing annotation into python 3.10 style HOT 1
- Codecov is failing HOT 7
- Docutils is slow for constructor links HOT 1
- doc(FAQ): How to lint? HOT 1
- Release automation is broken HOT 3
- Move away from appdirs package
- 24.3.3: pytest fails in `pydoctor/test/test_cyclic_imports_base_classes.py::test_cyclic_imports_base_classes` unit HOT 1
- Add support for PEP727 - typing.Doc
- Do a real distinction in between the code model and the view model
- Add support for doc comments HOT 2
- HTML: Break function signature elements into multiple spans HOT 2
- Drop python 3.7
- Source code files are always assumed to be uft-8
- Syntax error reports don't contain information about the error HOT 2
- Minimize the docstring line numbers offset introduced by napoleon
- pydoctor crashes on Windows when trying to symlink to a nonexistent file: 'index.html' HOT 5
- Create a new test module for the linker
- Setup security bug report process
- Inline docstring is confused if there is a comment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydoctor.