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

Create PEP 8-style document with the intended formatting style explicitly described #53

Closed
ambv opened this issue Mar 21, 2018 · 13 comments
Assignees
Labels
good first issue Good for newcomers T: documentation Improvements to the docs (e.g. new topic, correction, etc)

Comments

@ambv
Copy link
Collaborator

ambv commented Mar 21, 2018

This will help users identify whether what they see is a bug or a feature.

A document like this also helps with giving reasons for specific behavior.

@ambv ambv added good first issue Good for newcomers T: documentation Improvements to the docs (e.g. new topic, correction, etc) labels Mar 21, 2018
@willingc
Copy link
Collaborator

@ambv Using Black and loving it, are you planning on using Sphinx or something else? Happy to help get things started if Sphinx.

@ambv
Copy link
Collaborator Author

ambv commented Mar 22, 2018

Yes, Sphinx and RTFD would be my first choice :-)

@willingc
Copy link
Collaborator

@ambv Can you link to an example of the pep8 style doc that you were thinking? The pep itself or something else. Thanks.

@ambv
Copy link
Collaborator Author

ambv commented Mar 27, 2018

PEP 8 itself is good but wordy. Google Style Guide is also good.

@willingc
Copy link
Collaborator

@ambv @carljm Giving some thought to this. In some cases, Original and After Black will be helpful to illustrate what will happen. Initially, I'm starting with something similar to:

My current thinking is that Original/After Black examples will cut down on wordiness in PEP8.

Side by side code displays could be cool too.

tony added a commit to tmux-python/libtmux that referenced this issue Aug 25, 2018
tony added a commit to vcs-python/libvcs that referenced this issue Aug 25, 2018
tony added a commit to tmux-python/libtmux that referenced this issue Aug 25, 2018
tony added a commit to vcs-python/vcspull that referenced this issue Aug 25, 2018
tony added a commit to cihai/cihai that referenced this issue Aug 25, 2018
tony added a commit to cihai/unihan-etl that referenced this issue Aug 25, 2018
tony added a commit to cihai/unihan-db that referenced this issue Aug 25, 2018
tony added a commit to cihai/cihai-cli that referenced this issue Aug 25, 2018
@ambv ambv added the stable label Mar 3, 2020
@SanketDG
Copy link
Contributor

SanketDG commented May 8, 2020

@ambv If I understand correctly, this has already been superseded by "The Black Code Style", yes?

@mcsitter
Copy link
Contributor

mcsitter commented Sep 8, 2020

The Black code style appears to b quite complete. Are there things missing?

@felix-hilden
Copy link
Collaborator

Another ping, since this issue is on the "Amazing documentation" project. I do second the earlier commenters. Is there a need for further documentation on this front?

@ichard26
Copy link
Collaborator

ichard26 commented Apr 6, 2021

@felix-hilden I think the state of the style documentation is way better as of lately, but there's still a few areas which are missing:

  1. the extra string handling Black has (currently locked away under a --experimental-string-processing flag); and
  2. the docstring formatting Black does (I wouldn't recommend trying to add docs for them right now though since they will probably change since the current handling is IIRC a mistake from some other patch)

@felix-hilden
Copy link
Collaborator

I see, thanks! Would you accept contributions for the first one?

@ichard26
Copy link
Collaborator

@felix-hilden indeed! I'll be ever so annoyed at you for worsening the eventual merge conflict I'll have to deal with when I submit my documentation reorganization PR (hopefully soon!), but that's more on me for not finishing it quick enough ;-)

@felix-hilden
Copy link
Collaborator

I'll make sure then to beat you to the punch by the smallest possible margin 😄

From the discussions in #1740 I might also try to include some info on the docstring processing.

@felix-hilden
Copy link
Collaborator

Now that the missing information was added to the style documentation, and instructions on modifying said documentation was also added to CONTRIBUTING.md, future style-modifying PRs will carry their own weight in terms of documentation.

Is this issue ready to be closed?

tony added a commit to cihai/unihan-etl that referenced this issue Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers T: documentation Improvements to the docs (e.g. new topic, correction, etc)
Projects
None yet
Development

No branches or pull requests

6 participants