Skip to content
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

Bear proposal docformatter #1326

Open
jayvdb opened this issue Jan 19, 2017 · 5 comments · May be fixed by #1556
Open

Bear proposal docformatter #1326

jayvdb opened this issue Jan 19, 2017 · 5 comments · May be fixed by #1556
Assignees
Milestone

Comments

@jayvdb
Copy link
Member

jayvdb commented Jan 19, 2017

https://github.com/myint/docformatter

@satwikkansal
Copy link
Member

As docformatter gives output in unified diff format, we should wait for the PR for coala/coala#3733 to get merged.

@Makman2
Copy link
Member

Makman2 commented Mar 4, 2017

See also #699 for a more generic approach.

@satwikkansal satwikkansal linked a pull request Mar 28, 2017 that will close this issue
2 tasks
@jayvdb
Copy link
Member Author

jayvdb commented Apr 6, 2017

As docformatter gives output in unified diff format, we should wait for the PR for coala/coala#3733 to get merged.

Err, docformatter --in-place would be more efficient and less error prone that parsing unified diff.

@satwikkansal
Copy link
Member

docformatter --in-place actually modifies the file directly before prompting the user.

Ah, did you mean,

  • Keeping a copy of the original_file
  • Running the docformatter --in-place
  • In the process_output reading the original file contents.
  • Rewrite the original file to the earlier version (the version before docformatter --in-place was run)
  • Passing the new contents read to the process_output_corrected function to generate the results.

I earlier thought this would be a hacky approach (discussed similar approach in the channel).

Should I change my approach? Also, the unified diff approach is working as expected in my PC.

@Makman2
Copy link
Member

Makman2 commented Apr 6, 2017

This behaviour is not easy to implement with @linter (while avoiding reinventing the wheel), and I would rather use the unified-diff. Less I/O + more functionality for @linter imo.

@jayvdb jayvdb modified the milestones: 0.12, 0.11 Apr 25, 2017
@satwikkansal satwikkansal removed their assignment Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants