镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Use 'i' and 'k' to better distinguish variables in an example - #713

Merged
hynek merged 1 commit into
python-attrs:masterfrom
alexwlchan:patch-1
Nov 4, 2020
Merged

hynek merged 1 commit into
python-attrs:masterfrom
alexwlchan:patch-1

Conversation

@alexwlchan

Copy link
Copy Markdown
Contributor

It took me a moment of staring at this example to realise that i and j were actually different variables. They're not very different in the monospaced font!

I'm hoping that i and k will make them stand out more, and this example easier to read.

(Most letters seem to have a use already in this file, or I'd have picked an even more different pair of letters.)

—

Pull Request Check List

This is just a friendly reminder about the most common mistakes. Please make sure that you tick all boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing left to do. If your pull request is a documentation fix or a trivial typo, feel free to delete the whole thing.

  • Added tests for changed code.
  • New features have been added to our Hypothesis testing strategy.
  • Changes or additions to public APIs are reflected in our type stubs (files ending in .pyi).
    • ...and used in the stub test file tests/typing_example.py.
  • Updated documentation for changed code.
    • New functions/classes have to be added to docs/api.rst by hand.
    • Changes to the signature of @attr.s() have to be added by hand too.
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in our __init__.py file.
  • Documentation in .rst files is written using semantic newlines.
  • Changes (and possible deprecations) have news fragments in changelog.d.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

@hynek
hynek merged commit cd2f886 into python-attrs:master Nov 4, 2020
@hynek

hynek commented Nov 4, 2020

Copy link
Copy Markdown
Member

Thanks for improving our docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants