Pydocstringformatter - A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257.

Overview

PyPI pyversions Coverage Status Tests pre-commit.ci status

Pydocstringformatter

A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257. See What it does for currently supported auto-formatting.

How to install

pip install pydocstringformatter

Usage

usage: pydocstringformatter [-h] [-w] [-v] [files ...]

positional arguments:
  files

options:
  -h, --help     show this help message and exit
  -w, --write    Write the changes to file instead of printing the files to stdout
  -v, --version  Show version number and exit

Confiuguration

Pydocstringformatter will also read any configuration added to the [tool.pydocstringformatter] section of a pyproject.toml file.

Pre-commit

Pydocstringformatter can also be used as a pre-commit hook. Add the following to your .pre-commit-config.yaml file:

-   repo: https://github.com/DanielNoord/pydocstringformatter
    rev: SPECIFY VERSION HERE
    hooks:
    -   id: pydocstringformatter

What it does

The following examples show what pydocstringformatter will pick up on. All bad examples will be rewritten to follow the good patterns.

PEP 8: Note that most importantly, the """ that ends a multiline docstring should be on a line by itself:

# Bad
"""My
multi-line docstring"""

# Good
"""My
multi-line docstring
"""

PEP 256: The closing quotes are on the same line as the opening quotes

For consistency this rule also gets applied to multi-line docstrings

# Bad
"""
My docstring"""

"""My docstring
"""

"""
My
multi-line docstring
"""

# Good
"""My docstring"""

"""My docstring"""

"""My
multi-line docstring
"""

Development

Use pre-commit install to install the pre-commit hook for the repository.

Testing

To run all the tests:

pytest

To create test for a specific formatting option use the tests/data/format directory. For each .py file create a .py.out file with the expected output after formatting. The test suite will automatically pickup the new tests.

To only run a specific test from that directory, for example tests/data/format/multi_line/class_docstring.py, use:

pytest -k multi_line-class_docstring
Comments
  • Feature: two-pass formatting of the tokens

    Feature: two-pass formatting of the tokens

    Discussed here: https://github.com/DanielNoord/pydocstringformatter/issues/169

    Things to iron out:

    • [ ] should arguments be added to enable it? (--num-passes ... --no-check ????) .... I vote no arguments ...
    • [x] should the error be more user-friendly?
    • [ ] Regarding the failing tests ... option A. Fix the formatters so they become compatible, option B. Fix the tests so the incompatible formatters do not get called together (also change the defauts of just adding the --style"numpydoc" to prevent automatic collisions ...). LMK what you think.
    • [x] testing ... Right not by "playing with it" it works but a better unit testing is required.

    https://github.com/DanielNoord/pydocstringformatter/issues/169#issuecomment-1249090803

    I haven't looked at your branch as I am on mobile, but I'm highly in favour of this change. I'll gladly help review a PR but sadly won't have time to work on this myself this week.

    Some pointers to consider:

    * I think the maximum run count should be 2.
    
    * After the second run, a third run should occur. If we still create changes (note that these should ignore the --write flag but should only check if there are any potential change) we need to emit an error. `black` has a very elegant system where after there is an inconsistency aftwr 2/3 runs a pre-regenerated bug report is send to stdout. This can then be copied to an issue in GitHub which would allow us to resolve the issue.
    
    * We should test the issue template. So we need to write two incompatible test formatters and write a test where they fail to find a solution.
    

    That's all I can think of for now. Let me know if you have any questions! 😊

    • [ ] Issue template to report the problems

    Current error:

    >           raise RuntimeError(msg)
    E           RuntimeError: Conflicting formatters: numpydoc-section-spacing, closing-quotes
    E           --- numpydoc-section-spacing vs closing-quotes /private/var/folders/5j/x2qvf77j1m7736lccs2xt6c40000gn/T/pytest-of-sebastianpaez/pytest-187/test_formatting_numpydoc_numpy0/test_file.py
    E           +++ numpydoc-section-spacing vs closing-quotes /private/var/folders/5j/x2qvf77j1m7736lccs2xt6c40000gn/T/pytest-of-sebastianpaez/pytest-187/test_formatting_numpydoc_numpy0/test_file.py
    E           @@ -1,2 +1 @@
    E           -"""A docstring.
    E           -    """
    E           +"""A docstring."""
    
    enhancement 
    opened by jspaezp 53
  • added boolean optional argument support

    added boolean optional argument support

    Improved the toml parsing so it supports BooleanOptionalAction arguments in it. (also added tests for it ...)

    [tool.pydocstringformatter]
    write = false
    style = ["numpydoc"]
    strip-whitespaces = true  # <<<<<- previously unsupported
    split-summary-body = false # <<<<<- previously unsupported
    no-numpydoc-section-hyphen-length = true # <<<<<- previously unsupported
    

    .... where should I document this?

    enhancement 
    opened by jspaezp 25
  • Unable to Install the package

    Unable to Install the package

    pip install pydocstringformatter gives the following error

    ERROR: Could not find a version that satisfies the requirement pydocstringformatter (from versions: none) ERROR: No matching distribution found for pydocstringformatter

    Am I missing something?

    opened by Anurag-Pola 21
  • ENH: Add formatters for numpydoc section ordering and name/type spacing

    ENH: Add formatters for numpydoc section ordering and name/type spacing

    Related to #125; I got the bits I could think how to automate for the docstring style I actually use (numpydoc)

    Should probably extend the tests for more types of docstrings and more sections within each docstring.

    Ideally the section test would have docstrings on

    • [X] function
    • [ ] class
    • [ ] method
    • [x] generator
    • [x] module
    • [x] constant

    and would test the ordering of some subset of these sections:

    • [X] Parameters
    • [X] Returns
    • [X] Raises
    • [ ] Examples
    • [x] Yields
    • [x] References

    Formatters for:

    • [X] name-colon parameter spacing (x : float not x:float or x: float)
    • [X] Section ordering
    • [x] Section spacing (blank line between sections)
    • [x] Length of line of hyphens after section header (should be same length as section header)
    enhancement 
    opened by DWesl 18
  • Add primer tests

    Add primer tests

    TODO List:

    • [x] Create branch with changes in PR and branch with merge-base (see mypy)
    • [x] Run pydocstringformatter with merge-base branch in write mode
    • [x] Checkout to changes branch
    • [x] Do a non-write branch to get diff
    • [x] Prettify diff
    • [x] Probably tons more...
    primer 
    opened by DanielNoord 16
  • fix: write file using existing newlines (fixes #115)

    fix: write file using existing newlines (fixes #115)

    Here's my proposed solution. It should work in all cases, as it will default to the system default, if the file has different line endings (file.newlines returns a tuple).

    I manually tested it with Unix, Dos, and Mac formatted files, and they all retained their line endings.

    Fixes #115.

    bug 
    opened by rasa 12
  • Add line wrapping to summaries of docstrings

    Add line wrapping to summaries of docstrings

    Partially handles #7, it's not even close right now 😄 The line wrapping fail because there are space before and after the leading string.

    • [ ] Line wrapping after certain line length
    • [ ] make line length configurable, search for settings of other tools (black, pylint)
    • [ ] Break up multiple sentences on first line into summary and main block (see PEP 256)
    • [ ] Handle numpy/google style docstrings gracefully with line wrapping
    enhancement 
    opened by Pierre-Sassoulas 12
  • Emoji in run.py crashes using pre-commit python 3.8.10

    Emoji in run.py crashes using pre-commit python 3.8.10

    Hey Daniel, The emoji in the last print statement under run.py crashes when using Python version that does not support emojis.

    UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f389' in position 42: character maps to <undefined>

    For example for my Python 3.5.3, Windows 10 Pro 64 bit.

    Do we want to support older version of Python with this tool? If so maybe the print statement should be modified?

    bug 
    opened by orSolocate 11
  • Bump pytest from 7.1.3 to 7.2.0

    Bump pytest from 7.1.3 to 7.2.0

    Bumps pytest from 7.1.3 to 7.2.0.

    Release notes

    Sourced from pytest's releases.

    7.2.0

    pytest 7.2.0 (2022-10-23)

    Deprecations

    • #10012: Update pytest.PytestUnhandledCoroutineWarning{.interpreted-text role="class"} to a deprecation; it will raise an error in pytest 8.

    • #10396: pytest no longer depends on the py library. pytest provides a vendored copy of py.error and py.path modules but will use the py library if it is installed. If you need other py.* modules, continue to install the deprecated py library separately, otherwise it can usually be removed as a dependency.

    • #4562: Deprecate configuring hook specs/impls using attributes/marks.

      Instead use :pypytest.hookimpl{.interpreted-text role="func"} and :pypytest.hookspec{.interpreted-text role="func"}. For more details, see the docs <legacy-path-hooks-deprecated>{.interpreted-text role="ref"}.

    • #9886: The functionality for running tests written for nose has been officially deprecated.

      This includes:

      • Plain setup and teardown functions and methods: this might catch users by surprise, as setup() and teardown() are not pytest idioms, but part of the nose support.
      • Setup/teardown using the @​with_setup decorator.

      For more details, consult the deprecation docs <nose-deprecation>{.interpreted-text role="ref"}.

    Features

    • #9897: Added shell-style wildcard support to testpaths.

    Improvements

    • #10218: @pytest.mark.parametrize() (and similar functions) now accepts any Sequence[str] for the argument names, instead of just list[str] and tuple[str, ...].

      (Note that str, which is itself a Sequence[str], is still treated as a comma-delimited name list, as before).

    • #10381: The --no-showlocals flag has been added. This can be passed directly to tests to override --showlocals declared through addopts.

    • #3426: Assertion failures with strings in NFC and NFD forms that normalize to the same string now have a dedicated error message detailing the issue, and their utf-8 representation is expresed instead.

    • #7337: A warning is now emitted if a test function returns something other than [None]{.title-ref}. This prevents a common mistake among beginners that expect that returning a [bool]{.title-ref} (for example [return foo(a, b) == result]{.title-ref}) would cause a test to pass or fail, instead of using [assert]{.title-ref}.

    • #8508: Introduce multiline display for warning matching via :pypytest.warns{.interpreted-text role="func"} and enhance match comparison for :py_pytest._code.ExceptionInfo.match{.interpreted-text role="func"} as returned by :pypytest.raises{.interpreted-text role="func"}.

    • #8646: Improve :pypytest.raises{.interpreted-text role="func"}. Previously passing an empty tuple would give a confusing error. We now raise immediately with a more helpful message.

    • #9741: On Python 3.11, use the standard library's tomllib{.interpreted-text role="mod"} to parse TOML.

      tomli{.interpreted-text role="mod"}` is no longer a dependency on Python 3.11.

    • #9742: Display assertion message without escaped newline characters with -vv.

    • #9823: Improved error message that is shown when no collector is found for a given file.

    ... (truncated)

    Commits
    • 3af3f56 Prepare release version 7.2.0
    • bc2c3b6 Merge pull request #10408 from NateMeyvis/patch-2
    • d84ed48 Merge pull request #10409 from pytest-dev/asottile-patch-1
    • ffe49ac Merge pull request #10396 from pytest-dev/pylib-hax
    • d352098 allow jobs to pass if codecov.io fails
    • c5c562b Fix typos in CONTRIBUTING.rst
    • d543a45 add deprecation changelog for py library vendoring
    • f341a5c Merge pull request #10407 from NateMeyvis/patch-1
    • 1027dc8 [pre-commit.ci] auto fixes from pre-commit.com hooks
    • 6b905ee Add note on tags to CONTRIBUTING.rst
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependency 
    opened by dependabot[bot] 8
  • added pyc and __pycache__ to gitignore

    added pyc and __pycache__ to gitignore

    added pyc and pycache to gitignore

    (I would personally add venv as well, since it is a very common practice to have the virtual environment in the same directory as the project)

    maintenance 
    opened by jspaezp 7
  • Make every formatter optional

    Make every formatter optional

    Work in progress, this still need more robust tests. This would permit to automatically generate the arguments and to activate or deactivate every parser while still having a default.

    enhancement 
    opened by Pierre-Sassoulas 7
  • Update sphinx requirement from ~=5.3.0 to ~=6.0.0

    Update sphinx requirement from ~=5.3.0 to ~=6.0.0

    Updates the requirements on sphinx to permit the latest version.

    Release notes

    Sourced from sphinx's releases.

    v6.0.0

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    Changelog

    Sourced from sphinx's changelog.

    Release 6.0.0 (released Dec 29, 2022)

    Dependencies

    • #10468: Drop Python 3.6 support
    • #10470: Drop Python 3.7, Docutils 0.14, Docutils 0.15, Docutils 0.16, and Docutils 0.17 support. Patch by Adam Turner

    Incompatible changes

    • #7405: Removed the jQuery and underscore.js JavaScript frameworks.

      These frameworks are no longer be automatically injected into themes from Sphinx 6.0. If you develop a theme or extension that uses the jQuery, $, or $u global objects, you need to update your JavaScript to modern standards, or use the mitigation below.

      The first option is to use the sphinxcontrib.jquery_ extension, which has been developed by the Sphinx team and contributors. To use this, add sphinxcontrib.jquery to the extensions list in conf.py, or call app.setup_extension("sphinxcontrib.jquery") if you develop a Sphinx theme or extension.

      The second option is to manually ensure that the frameworks are present. To re-add jQuery and underscore.js, you will need to copy jquery.js and underscore.js from the Sphinx repository_ to your static directory, and add the following to your layout.html:

      .. code-block:: html+jinja

      {%- block scripts %} {{ super() }} {%- endblock %}

      .. _sphinxcontrib.jquery: https://github.com/sphinx-contrib/jquery/

      Patch by Adam Turner.

    • #10471, #10565: Removed deprecated APIs scheduled for removal in Sphinx 6.0. See :ref:dev-deprecated-apis for details. Patch by Adam Turner.

    • #10901: C Domain: Remove support for parsing pre-v3 style type directives and roles. Also remove associated configuration variables c_allow_pre_v3 and c_warn_on_allowed_pre_v3. Patch by Adam Turner.

    Features added

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependency 
    opened by dependabot[bot] 0
  • `--max-line-length` doesn't work as expected

    `--max-line-length` doesn't work as expected

    I ran pydocstringformatter --max-line-length=10 -w example.py on the command line, expecting pydocstringformatter will change this:

    """Hello yeeeeeeeee."""
    

    to this:

    """Hello yeee
       eeeeee."""
    

    But I didn't see any change. Did I do anything wrong with the command line?

    opened by averywpx 4
  • Better summary detection (no dot added in the middle of a sentence)

    Better summary detection (no dot added in the middle of a sentence)

    In the following example pydocstringformatter add a .\n after "that".

    def _looks_like_subscriptable(node: ClassDef) -> bool:
        """
        Returns True if the node corresponds to a ClassDef of the Collections.abc module that
        supports subscripting
        """
        pass
    

    It would be nice to detect summary better, see https://github.com/PyCQA/astroid/pull/1792#issuecomment-1250256197

    enhancement 
    opened by Pierre-Sassoulas 0
  • Bug/Fature: Doctest support

    Bug/Fature: Doctest support

    Hi again ...

    So I wanted to pitch improving the example/doctest (https://docs.python.org/3/library/doctest.html) support in the library.

    Right now the behavior is pretty ... not great.

    This ....

    def my_function(lst):
        """
        >>> my_function([1,  1,
        ...     1,2,3,3,4, 5])
        "processed [1,1,1,2,3,3,4,5]"
        """
    
        return "processed " + str(lst)
    

    Becomes ....

    
    def my_function(lst):
        """
        >>> my_function([1,  1,.
    
        ...     1,2,3,3,4, 5])
        "processed [1,1,1,2,3,3,4,5]"
        """
    
        return "processed " + str(lst)
    

    I am proposing ...

    • [ ] adding support for this type of expressions
    • [ ] if possible 'blackening' the code
    • [ ] in the case of numpydocs, make sure it is inside an Examples section (https://numpydoc.readthedocs.io/en/v1.4.0/format.html#examples)

    Ideal output for reference:

    
    def my_function(lst):
        """
        >>> my_function([1,1,1,2,3,3,4,5])
        "processed [1,1,1,2,3,3,4,5]"
        """
    
        return "processed " + str(lst)
    
    opened by jspaezp 2
  • Feature request: Improved documentation

    Feature request: Improved documentation

    I think it would be great to have better docs in a couple of instances.

    1. Examples of the supported documentation styles
    2. Examples of the changes implied by the configuration arguments.
    3. Improve the description of the arguments that shows up with --help to make clear what styles it applies to.
    4. Make clear what it entails to change the --style argument or have several, whether it is going to convert the docstrings to that style (example??). And when having multiple styles, whether the expectation should be that it will allow sections that have each style or can each individual docstring have only one?

    I think it should be done in a way that it is auto-generated or tested. We could even add some of the formatting tests to the documentation. This would entail some changes in the making/rendering of the documentation.

    LMK what you think, I think that if we agree on what the correct approach will be I will be happy to help adding those. Best!

    opened by jspaezp 2
Releases(v0.7.2)
  • v0.7.2(Aug 30, 2022)

    What's Changed

    • Fix crash with almost empty docstrings by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/151

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.7.1...v0.7.2

    Source code(tar.gz)
    Source code(zip)
  • v0.7.1(Aug 24, 2022)

    What's Changed

    • Fix tomli vs tomllib import by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/149

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.7.0...v0.7.1

    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Aug 21, 2022)

    What's Changed

    • Fix parsing of values in pyproject.toml by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/129
    • Add the --style option by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/138
    • Run formatters based on the selected style by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/145
    • ENH: Add formatters for numpydoc section ordering and name/type spacing by @DWesl in https://github.com/DanielNoord/pydocstringformatter/pull/132

    New Contributors

    • @DWesl made their first contribution in https://github.com/DanielNoord/pydocstringformatter/pull/132

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.6.2...v0.7.0

    Source code(tar.gz)
    Source code(zip)
  • v0.6.2(Jul 6, 2022)

    Bug fixes:

    • Fix parsing of values in pyproject.toml by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/129

    Other changes:

    • Make 3.11 support explicit by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/121
    • Made all modules and files private by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/122
    • Use furo as documentation theme by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/123

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.6.1...v0.6.2

    Source code(tar.gz)
    Source code(zip)
  • v0.6.1(Jun 18, 2022)

    Bug fixes:

    • fix: write file using existing newlines (fixes #115) by @rasa in https://github.com/DanielNoord/pydocstringformatter/pull/117

    New Contributors

    • @rasa made their first contribution in https://github.com/DanielNoord/pydocstringformatter/pull/117

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.6.0...v0.6.1

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(May 23, 2022)

    New functions:

    • Handle multi-line summaries in FinalPeriodFormatter by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/77
    • Add a newline to the end of the diff output by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/79
    • Create SummaryAndDescriptionFormatter by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/82
    • Add --exit-code option and add number of files to output by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/81
    • Add line wrapping to summaries of docstrings by @Pierre-Sassoulas in https://github.com/DanielNoord/pydocstringformatter/pull/14
    • Make SplitSummaryAndDocstringFormatter non-optional by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/94
    • Improve removal of unnecessary or double white lines by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/98
    • Add --max-line-length option by @mdczaplicki in https://github.com/DanielNoord/pydocstringformatter/pull/105

    Bug fixes:

    • Fix the SummaryFormatter by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/76
    • Fix handling of summaries on a separate line by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/89
    • Fix a bug with wrapping of single line summaries by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/95

    Project changes:

    • Add primer tests by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/78

    New Contributors

    • @mdczaplicki made their first contribution in https://github.com/DanielNoord/pydocstringformatter/pull/105

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.5.3...v0.6.0

    Source code(tar.gz)
    Source code(zip)
  • v0.5.3(Mar 15, 2022)

    What's Changed

    • Fix a crash with SummaryFormatter by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/76

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.5.2...v0.5.3

    Source code(tar.gz)
    Source code(zip)
  • v0.5.2(Mar 15, 2022)

  • v.0.5.1(Mar 15, 2022)

    Please use version 0.5.2. This version has been yanked.

    Bug fixes:

    • Fix bug with pre-commit hook config by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/73

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.5.0...v.0.5.1

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Mar 13, 2022)

    New functions:

    • Create more formal documentation. Create docs and use Readthedocs for hosting by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/56
    • Improved usage message. Separate optional and non-optional formatters in help message by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/55
    • Add --push-multiline-opening option by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/53
    • Improve SplitSummaryAndDocstringFormatter by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/69

    Bug fixes:

    • Create a constant for duplicated end of sentence punctuation by @Pierre-Sassoulas in https://github.com/DanielNoord/pydocstringformatter/pull/51
    • Add ':' and ';' to allowed punctuation by @Pierre-Sassoulas in https://github.com/DanielNoord/pydocstringformatter/pull/52

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.4.0...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Feb 10, 2022)

    New functions:

    • New formatter that formats the type of quotes used for docstrings. Add QuotesTypeFormatter by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/47

    Bug fixes:

    • Handle docstrings in single quoted strings correctly by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/46
    • Allow question marks at the end of a docstring/summary by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/49

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.3.0...v0.4.0

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Feb 10, 2022)

    New functions:

    • New formatter that adds periods to the end of docstrings. Add formatter of final period for single line docstrings and summaries by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/23
    • New formatter that adds a white line between a summary and the docstring body. Add SplitSummaryAndDocstringFormatter and update testutils by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/30
    • New formatter that capitalises the first letter of every docstring. Capitalize the first letter of the docstring by @Pierre-Sassoulas in https://github.com/DanielNoord/pydocstringformatter/pull/8
    • New formatter that strips whitespaces from 1) docstring start, 2) docstring end and 3) end of lines. Add StripWhitespacesFormatter by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/41
    • Every formatter can now be turned on or off with commands. Make every formatter optional by @Pierre-Sassoulas in https://github.com/DanielNoord/pydocstringformatter/pull/15
    • A new exclude option had been added. Add an exclude option to exclude files based on glob patterns by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/31
    • A new quiet option had been added that silences all status messages. Add --quiet option by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/39
    • We now print out a diff instead of the full file in non-write mode. Print out diff instead of complete file for formatting changes by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/19

    Bug fixes:

    • Reconfigure encoding of stdout to ensure emoji's can be displayed by @DanielNoord in https://github.com/DanielNoord/pydocstringformatter/pull/16

    Full Changelog: https://github.com/DanielNoord/pydocstringformatter/compare/v0.2.0...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jan 2, 2022)

    New functions:

    • Format the position of the opening quotes of (potential) single line quotes
    • Allow setting configuration options in pyproject.toml

    Bug fixes:

    • Incorrect recognition of module docstrings after new lines
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Jan 2, 2022)

Owner
Daniël van Noord
Daniël van Noord
Use Brainf*ck with python!

Brainfudge Run Brainf*ck code with python! Classes Interpreter(array_len): encapsulate all functions into class __init__(self, array_len: int=30000) -

1 Dec 14, 2021
Python syntax highlighted Markdown doctest.

phmdoctest 1.3.0 Introduction Python syntax highlighted Markdown doctest Command line program and Python library to test Python syntax highlighted cod

Mark Taylor 16 Aug 09, 2022
📘 OpenAPI/Swagger-generated API Reference Documentation

Generate interactive API documentation from OpenAPI definitions This is the README for the 2.x version of Redoc (React-based). The README for the 1.x

Redocly 19.2k Jan 02, 2023
Types that make coding in Python quick and safe.

Type[T] Types that make coding in Python quick and safe. Type[T] works best with Python 3.6 or later. Prior to 3.6, object types must use comment type

Contains 17 Aug 01, 2022
Official Matplotlib cheat sheets

Official Matplotlib cheat sheets

Matplotlib Developers 6.7k Jan 09, 2023
Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts

Have you always wished Jupyter notebooks were plain text documents? Wished you could edit them in your favorite IDE? And get clear and meaningful diff

Marc Wouts 5.7k Jan 04, 2023
graphical orbitational simulation of solar system planets with real values and physics implemented so you get a nice elliptical orbits. you can change timestamp value or scale from source code idc.

solarSystemOrbitalSimulation graphical orbitational simulation of solar system planets with real values and physics implemented so you get a nice elli

Mega 3 Mar 03, 2022
Mayan EDMS is a document management system.

Mayan EDMS is a document management system. Its main purpose is to store, introspect, and categorize files, with a strong emphasis on preserving the contextual and business information of documents.

3 Oct 02, 2021
Python Programming (Practical) (1-25) Download 👇🏼

BCA-603 : Python Programming (Practical) (1-25) Download zip 🙂 🌟 How to run programs : Clone or download this repo to your computer. Unzip (If you d

Milan Jadav 2 Jun 02, 2022
Always know what to expect from your data.

Great Expectations Always know what to expect from your data. Introduction Great Expectations helps data teams eliminate pipeline debt, through data t

Great Expectations 7.8k Jan 05, 2023
Easy OpenAPI specs and Swagger UI for your Flask API

Flasgger Easy Swagger UI for your Flask API Flasgger is a Flask extension to extract OpenAPI-Specification from all Flask views registered in your API

Flasgger 3.1k Dec 24, 2022
SqlAlchemy Flask-Restful Swagger Json:API OpenAPI

SAFRS: Python OpenAPI & JSON:API Framework Overview Installation JSON:API Interface Resource Objects Relationships Methods Custom Methods Class Method

Thomas Pollet 361 Nov 16, 2022
Quick tutorial on orchest.io that shows how to build multiple deep learning models on your data with a single line of code using python

Deep AutoViML Pipeline for orchest.io Quickstart Build Deep Learning models with a single line of code: deep_autoviml Deep AutoViML helps you build te

Ram Seshadri 6 Oct 02, 2022
An open source utility for creating publication quality LaTex figures generated from OpenFOAM data files.

foamTEX An open source utility for creating publication quality LaTex figures generated from OpenFOAM data files. Explore the docs » Report Bug · Requ

1 Dec 19, 2021
Practical Python Programming

Welcome! When I first learned Python nearly 25 years ago, I was immediately struck by how I could productively apply it to all sorts of messy work pro

Dabeaz LLC 8.3k Jan 08, 2023
FireEye Related Projects

FireEye FireEye Related Projects Tor-IP-Collector Simple python script that will collect a list of TOR IPs from the SecOps Institute Github and inject

Taran Ulrich 2 Nov 12, 2022
💯 Coolest snippets

nvim-snippets This was originally included in my personal Neovim setup, but I didn't like having all the snippets there so I decided to have them sepa

Eliaz Bobadilla 6 Aug 31, 2022
Generating a report CSV and send it to an email - Python / Django Rest Framework

Generating a report in CSV format and sending it to a email How to start project. Create a folder in your machine Create a virtual environment python3

alexandre Lopes 1 Jan 17, 2022
An MkDocs plugin to export content pages as PDF files

MkDocs PDF Export Plugin An MkDocs plugin to export content pages as PDF files The pdf-export plugin will export all markdown pages in your MkDocs rep

Terry Zhao 266 Dec 13, 2022
Compare two CSV files for differences. Colorize the differences and align the columns.

pretty-csv-diff Compare two CSV files for differences. Colorize the differences and align the columns. Command-Line Example Command-Line Usage usage:

Devon 6 Dec 29, 2022