Comments (8)
Great, thanks, looks fixed. As a side comment the newlines after formatting the newlines are just \n
, not \r\n\
but I think one can live with that.
from style-doc.
Hey @epogrebnyak
many thanks for reporting this. I will investigate it.
from style-doc.
Maybe not tested on Windows and \r\n
not appreciated?
from style-doc.
I can confirm it. It is a windows \r\n
newline issue.
I added a test for linux encoding:
style-doc/tests/test_style_doc.py
Lines 19 to 30 in 34744cd
If you see a way how to fix it - feel free for a PR.
from style-doc.
It should be possible to read the file and convert all newlines to \n
while reading it:
https://docs.python.org/3/library/functions.html#open
from style-doc.
Similarly to the test code, when new line is not specified, open() transforms any newlines to \n (universal newline), so for the PR I'll just try skipping the new line parameter in open().
from style-doc.
@epogrebnyak this is fixed - see fbf9974
from style-doc.
@epogrebnyak I made a new release on pypi. Can you please update the package and try it on your side?
from style-doc.
Related Issues (20)
- Fix issues when code has `"""` but is not a docstring
- Add badges to README HOT 2
- Doc for GitHub Action integration HOT 1
- Sync doc with HPOflow (versioning and pypi action) HOT 3
- Write how we use docstrings for classes and __init__ HOT 1
- add option to warn when __init__ has docstring
- fix tabs in 3rd party notes HOT 1
- Very long one line docstrings are not formatted
- --max-len seems mandatory, not optional parameter HOT 2
- add more linting HOT 1
- Create a git pre-commit hook for style-doc HOT 1
- Ignore commented-out classes/functions/etc. HOT 2
- Finish py and rst only impl. HOT 1
- Add option to use config file
- Add ignore option on file level
- Add ignore option on block or line level
- How should we "communicate" an error? HOT 2
- Add style-doc checks (Makefile & Action) HOT 1
- Finish documentation HOT 2
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 style-doc.