Skip to content

Commit

Permalink
Merge pull request #93 from MarcoGorelli/pydocstyle
Browse files Browse the repository at this point in the history
CI pass pydocstyle
  • Loading branch information
MarcoGorelli committed Jul 24, 2020
2 parents 250d440 + 2b6122c commit 54a6570
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 25 deletions.
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ nbQA
.. image:: https://interrogate.readthedocs.io/en/latest/_static/interrogate_badge.svg
:target: https://github.com/econchick/interrogate

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

Adapter to run any code-quality tool on a Jupyter notebook. Documentation is hosted here_.

Prerequisites
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ stages:
flake8
mypy .
interrogate nbqa tests -v -c pyproject.toml
pydocstyle nbqa tests
displayName: 'static analysis'
- script: |
Expand Down Expand Up @@ -100,6 +101,7 @@ stages:
flake8
mypy .
interrogate nbqa tests -v -c pyproject.toml
pydocstyle nbqa tests
displayName: 'static analysis'
- script: |
Expand Down
4 changes: 1 addition & 3 deletions nbqa/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Attributes used by in docs / packaging.
"""
"""Attributes used by in docs / packaging."""

__author__ = """Marco Gorelli"""
__email__ = "m.e.gorelli@gmail.com"
Expand Down
7 changes: 2 additions & 5 deletions nbqa/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Run third-party tool (e.g. :code:`mypy`) against notebook or directory.
"""
"""Run third-party tool (e.g. :code:`mypy`) against notebook or directory."""

import argparse
import configparser
Expand Down Expand Up @@ -277,7 +275,7 @@ def _replace_temp_python_file_references_in_out_err(
def _replace_tmpdir_references(
out: str, err: str, cwd: Optional[Path] = None
) -> Tuple[str, str]:
"""
r"""
Replace references to temporary directory name with current working directory.
Parameters
Expand Down Expand Up @@ -475,7 +473,6 @@ def main(raw_args: Optional[List[str]] = None) -> None:
Command-line arguments (if calling this function directly), defaults to
:code:`None` if calling via command-line.
"""

command, root_dir, kwargs = _parse_args(raw_args)

notebooks = _get_notebooks(root_dir)
Expand Down
4 changes: 1 addition & 3 deletions nbqa/put_magics_back_in.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Uncomment magic IPython lines from converted notebook.
"""
"""Uncomment magic IPython lines from converted notebook."""

import re
from typing import TYPE_CHECKING
Expand Down
5 changes: 1 addition & 4 deletions nbqa/replace_magics.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Comment-out magic IPython lines from converted notebook.
"""
"""Comment-out magic IPython lines from converted notebook."""

import re
from typing import TYPE_CHECKING
Expand All @@ -18,7 +16,6 @@ def main(temp_python_file: "Path") -> None:
temp_python_file
Temporary Python file notebook was converted to.
"""

with open(str(temp_python_file), "r") as handle:
file = handle.read()

Expand Down
1 change: 0 additions & 1 deletion nbqa/save_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def main(notebook: "Path", temp_python_file: "Path") -> None:
temp_python_file
Temporary Python file to save converted notebook in.
"""

with open(notebook, "r") as handle:
parsed_notebook = json.load(handle)

Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ interrogate==1.2.0
isort==5.0.9
mypy==0.782
pre-commit==2.6.0
pydocstyle==5.0.2
pytest==5.4.3
pytest-cov==2.10.0
4 changes: 1 addition & 3 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
"""
Necessary so we can run :code:`pytest`.
"""
"""Necessary so we can run :code:`pytest`."""
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Define some fixtures that can be re-used between tests.
"""
"""Define some fixtures that can be re-used between tests."""

import shutil
from pathlib import Path
Expand Down
4 changes: 1 addition & 3 deletions tests/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
"""
Necessary so we can run :code:`pytest`.
"""
"""Necessary so we can run :code:`pytest`."""

0 comments on commit 54a6570

Please sign in to comment.