telekom / style-doc Goto Github PK
View Code? Open in Web Editor NEWBlack for Python docstrings and reStructuredText (rst).
License: Apache License 2.0
Black for Python docstrings and reStructuredText (rst).
License: Apache License 2.0
Main
====
become
Main ====
after running style-doc and not longer recognised as header. I think this is not intended behaviour.
The constructor should be documented at class level and not at the init function.
I run style-doc . --check
and get an error while ```style-doc . --check `--max-len 80`` works.
The error message is:
File "c:\users\epogr\anaconda3\lib\site-packages\style_doc\style_doc.py", line 460, in style_docstring
if len(docstring) < max_len and "\n" not in docstring:
TypeError: '<' not supported between instances of 'int' and 'NoneType'
Currently the search for """
isn't respecting commented out code:
# For future implementation
# def base_url(self) -> str:
# """
# Generate SCIM base url
# """
# return "https://app.asana.com/api/1.0/scim/"
becomes:
# For future implementation
# def base_url(self) -> str:
# """
# Generate SCIM base url #
"""
# return "https://app.asana.com/api/1.0/scim/"
Which is a syntax error, since it is uncommenting one of the """.
Have you considered packaging style-doc
for use as a git pre-commit hook, and listing it with the pre-commit project? It seems like it would be a great addition, and make it very easy for people to integrate the docstring formatter into their existing workflows and get automatic updates when new releases happen.
We had to apply this workaround:
style-doc/style_doc/style_doc.py
Lines 495 to 497 in db352ed
# fmt: off
and # fmt: on
is needed so black does not convert it back to '"""'
.
"You must not set --py_only and --rst_only at the same time."
with sys.exit(1)
or -1
or raise ValueError(...
raise ValueError(f"{len(changed)} files should be restyled!")
or use ``sys.exit...`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.