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

D301 exceptions #365

Merged
merged 1 commit into from Oct 21, 2019
Merged

D301 exceptions #365

merged 1 commit into from Oct 21, 2019

Conversation

@timhoffm
Copy link
Contributor

timhoffm commented May 27, 2019

This adds a few exceptions to D301: Use r""" if any backslashes in a docstring.

Some backslashes are usually intended string formatting in docstrings and should not be escaped (directly or indirectly via a raw string). These include:

  • Line continuations (c.f. #364).
  • Unicode literals \u... and \N....

Closes #364.


Thanks for submitting a PR!

Please make sure to check for the following items:

  • Add unit tests and integration tests where applicable.
    If you've added an error code or changed an error code behavior,
    you should probably add or change a test case file under tests/test_cases/ and add
    it to the list under tests/test_definitions.py.
    If you've added or changed a command line option,
    you should probably add or change a test in tests/test_integration.py.
  • Add a line to the release notes (docs/release_notes.rst) under "Current Development Version".
    Make sure to include the PR number after you open and get one.

Please don't get discouraged as it may take a while to get a review.

@timhoffm timhoffm force-pushed the timhoffm:D301-exceptions branch 2 times, most recently from 1806018 to 35f6a11 May 27, 2019
@timhoffm

This comment has been minimized.

Copy link
Contributor Author

timhoffm commented Jul 7, 2019

A pity this did not make it into 4.0.

@Nurdok

This comment has been minimized.

Copy link
Member

Nurdok commented Jul 9, 2019

Apologies @timhoffm.
Can you please rebase from master? You'll need to manually update the release notes for the next version. I hope the next version is a few weeks away. I'll merge when you're done.

@timhoffm timhoffm force-pushed the timhoffm:D301-exceptions branch from 35f6a11 to 0f4d6ea Jul 9, 2019
@timhoffm timhoffm force-pushed the timhoffm:D301-exceptions branch from 0f4d6ea to 5d6bfef Sep 11, 2019
@timhoffm

This comment has been minimized.

Copy link
Contributor Author

timhoffm commented Sep 11, 2019

@Nurdok sorry, this slipped through. I've now rebased.

Copy link
Member

Nurdok left a comment

Just the smallest nit and we're done :)

docs/release_notes.rst Show resolved Hide resolved
@timhoffm timhoffm force-pushed the timhoffm:D301-exceptions branch from 5d6bfef to d2c248b Sep 21, 2019
@timhoffm

This comment has been minimized.

Copy link
Contributor Author

timhoffm commented Sep 21, 2019

Ping @Nurdok

@timhoffm timhoffm force-pushed the timhoffm:D301-exceptions branch from d2c248b to b4c7fc3 Oct 16, 2019
@timhoffm

This comment has been minimized.

Copy link
Contributor Author

timhoffm commented Oct 16, 2019

Rebased again. :sad:

Ping @Nurdok if this is lying around for longer times, it always picks up conflicts with the release notes.

@timhoffm timhoffm requested a review from Nurdok Oct 21, 2019
@Nurdok
Nurdok approved these changes Oct 21, 2019
@Nurdok

This comment has been minimized.

Copy link
Member

Nurdok commented Oct 21, 2019

Sorry for the lack of response, @timhoffm, I've been out on a family vacation. Thanks got the contribution! Merging.

@Nurdok Nurdok merged commit 51dc757 into PyCQA:master Oct 21, 2019
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@timhoffm timhoffm deleted the timhoffm:D301-exceptions branch Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.