Comments (8)
i tried pushing changes upstream to a branch that i created - so as to make a PR. but i don't seem to have permissions to do that to your repo. So not sure how to do any changes.
i updated as you mentioned (also added in a "=" sign character because i find it helpful to have in the doc string "default=" as well) and updated the tests. but not sure how i can push that up.
from pdoc.
The first line of the regex already accounts for parenthesized types (not arbitrary parameters):
Line 177 in e7868e2
See the test example: https://pdoc3.github.io/pdoc/doc/pdoc/test/example_pkg/index.html#pdoc.test.example_pkg.google
You make your regex accept .*
in parentheses, but I think simply adding comma to the list of accepted characters (:+1:) would work for your case:
re.compile(r'^([\w*]+)(?: \(([\w., ]+)\))?: '
Since docstring conversion is applied automatically, we limit the possibility for false positives if we don't make it match .*
. Do you feel you need any other characters besides comma, and why?
Additionally, in your example you have no space between the argument name and parenthesized parameter. A regex like this (:+1:) would support that as well.
re.compile(r'^([\w*]+)(?: *\(([\w., ]+)\))?: '
from pdoc.
Would you like to make a pull request for that?
i am having a slight issue getting the test to run.
What issue are you having?
from pdoc.
ah, you are correct ... my code started out with using comma character and didn't work and so i went to fixing that before i even tried testing with just a single type, which led me to thinking it didn't work at all. apologies.
no i can't imagine needing any other character other than comma (and even that i suppose is debatable, but i think google style is supposed to support that).
adding the comma to the regex works great. i also didn't realize it converts it to numpy-style on the output (rather than keeping the original formatting, such as "var (int): description"). jumped too many guns there.
i'll submit a PR with a test here in a bit.
i was being a bit cheekish with my comment about getting tests to run. my issue was that i didn't want to take the time to do it ;) -- but i have them up and running now.
from pdoc.
Still interested? Need any help? 😃
from pdoc.
Yes, you can't just push to this repo. First you fork and make your own repo and push to a branch on it. Then, GitHub will permit (and recommend) you to do a pull request: https://gist.github.com/Chaser324/ce0505fbed06b947d962
from pdoc.
@jmatzdorff-cpi Happy for you to finish this. 👍
You can add your own remote to your checkout with:
# Rename the current remote "origin" (that points to pdoc3/pdoc) to "upstream"
git remote rename origin upstream
# Add new "origin" remote
git remote add origin [email protected]:jmatzdorff-cpi/pdoc.git
# Push your changes to your new "origin" remote
# regardless of what the branch tracking is set to
git push origin HEAD:fix-3
# Note, this will create a new remote feature branch "fix3".
Afterwards when you go to pdoc3/pdoc, GitHub UI should propose a PR from the newly-pushed branch.
from pdoc.
well, when you give me exact steps; i can't exactly say i don't what to do :)
anyhow, it's pushed and PR requested!
from pdoc.
Related Issues (20)
- Skip-errors not recogniazed HOT 1
- Support inline math with dollar `$...$` delimiters when `--config latex_math=True`
- search field wont appear in generated html file HOT 1
- generating the whole project documentation with 1 command HOT 2
- Support search in docpage HOT 2
- Wrong search hyperlinks to page sections for inherited classes HOT 1
- Strike Through Markdown not working
- PEP224 style docstring not honoured for global variable of type Callable
- HTML files should end with a newline
- Upgrade code reference warnings to errors.
- --skip-errors flag does not work
- feature request: support for headings to organize functions
- Include html containing javascript
- Using a - in folder names prevents linking
- missing docstrings of methods HOT 2
- syntax error with match-case function
- Incorrectly rendered Args section HOT 1
- Add GitHub Flavor Markdown support HOT 2
- Remove indentation in text template for markdown files
- Deprecation warning for PEP224 class variable docstrings
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 pdoc.