Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 4e821f3

Browse files
committed
Renaming to pydocstyle
1 parent c47068d commit 4e821f3

14 files changed

+266
-209
lines changed

LICENSE-MIT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Copyright (c) 2012 GreenSteam, <http://greensteam.dk/>
2+
Copyright (c) 2014-2016 Amir Rachum, <http://amir.rachum.com/>
23

34
Permission is hereby granted, free of charge, to any person obtaining a copy of
45
this software and associated documentation files (the "Software"), to deal in

README.rst

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
PEP 257 docstring style checker
2-
===========================================================
1+
pydocstyle - docstring style checker
2+
====================================
33

4-
**pep257** is a static analysis tool for checking
5-
compliance with Python `PEP 257
6-
<http://www.python.org/dev/peps/pep-0257/>`_.
4+
(formerly pep257)
5+
6+
**pydocstyle** is a static analysis tool for checking compliance with Python
7+
docstring conventions.
8+
9+
**pydocstyle** supports most of
10+
`PEP 257 <http://www.python.org/dev/peps/pep-0257/>`_ out of the box, but it
11+
should not be considered a reference implementation.
712

813
The framework for checking docstring style is flexible, and
914
custom checks can be easily added, for example to cover
1015
NumPy `docstring conventions
1116
<https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_.
1217

13-
**pep257** supports Python 2.6, 2.7, 3.3, 3.4, 3.5, pypy and pypy3.
18+
**pydocstyle** supports Python 2.6, 2.7, 3.3, 3.4, 3.5, pypy and pypy3.
1419

1520
Quick Start
1621
-----------
@@ -20,14 +25,14 @@ Install
2025

2126
.. code::
2227
23-
pip install pep257
28+
pip install pydocstyle
2429
2530
Run
2631
^^^
2732

2833
.. code::
2934
30-
$ pep257 test.py
35+
$ pydocstyle test.py
3136
test.py:18 in private nested class `meta`:
3237
D101: Docstring missing
3338
test.py:22 in public method `method`:
@@ -38,15 +43,15 @@ Run
3843
Links
3944
-----
4045

41-
.. image:: https://travis-ci.org/GreenSteam/pep257.svg?branch=master
42-
:target: https://travis-ci.org/GreenSteam/pep257
46+
.. image:: https://travis-ci.org/PyCQA/pydocstyle.svg?branch=master
47+
:target: https://travis-ci.org/PyCQA/pydocstyle
4348

44-
.. image:: https://readthedocs.org/projects/pep257/badge/?version=latest
45-
:target: https://readthedocs.org/projects/pep257/?badge=latest
49+
.. image:: https://readthedocs.org/projects/pydocstyle/badge/?version=latest
50+
:target: https://readthedocs.org/projects/pydocstyle/?badge=latest
4651
:alt: Documentation Status
4752

48-
* `Read the full documentation here <http://pep257.readthedocs.org>`_.
53+
* `Read the full documentation here <http://pydocstyle.readthedocs.org>`_.
4954

50-
* `Fork pep257 on GitHub <http://github.com/GreenSteam/pep257>`_.
55+
* `Fork pydocstyle on GitHub <http://github.com/PyCQA/pydocstyle>`_.
5156

52-
* `PyPI project page <https://pypi.python.org/pypi/pep257>`_.
57+
* `PyPI project page <https://pypi.python.org/pypi/pydocstyle>`_.

docs/conf.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# pep257 documentation build configuration file, created by
3+
# pydocstyle documentation build configuration file, created by
44
# sphinx-quickstart on Fri Jan 30 20:30:42 2015.
55
#
66
# This file is execfile()d with the current directory set to its
@@ -48,17 +48,17 @@
4848
master_doc = 'index'
4949

5050
# General information about the project.
51-
project = u'pep257'
52-
copyright = u'2015, Vladimir Keleshev'
51+
project = u'pydocstyle'
52+
copyright = u'2016, Amir Rachum'
5353

5454
# The version info for the project you're documenting, acts as replacement for
5555
# |version| and |release|, also used in various other places throughout the
5656
# built documents.
5757
#
5858
# The short X.Y version.
59-
version = '0.5.0'
59+
version = '1.0.0'
6060
# The full version, including alpha/beta/rc tags.
61-
release = '0.5.0'
61+
release = '1.0.0'
6262

6363
# The language for content autogenerated by Sphinx. Refer to documentation
6464
# for a list of supported languages.
@@ -181,7 +181,7 @@
181181
#html_file_suffix = None
182182

183183
# Output file base name for HTML help builder.
184-
htmlhelp_basename = 'pep257doc'
184+
htmlhelp_basename = 'pydocstyledoc'
185185

186186

187187
# -- Options for LaTeX output ---------------------------------------------
@@ -201,8 +201,8 @@
201201
# (source start file, target name, title,
202202
# author, documentclass [howto, manual, or own class]).
203203
latex_documents = [
204-
('index', 'pep257.tex', u'pep257 Documentation',
205-
u'Vladimir Keleshev', 'manual'),
204+
('index', 'pydocstyle.tex', u'pydocstyle Documentation',
205+
u'Amir Rachum', 'manual'),
206206
]
207207

208208
# The name of an image file (relative to this directory) to place at the top of
@@ -231,8 +231,8 @@
231231
# One entry per manual page. List of tuples
232232
# (source start file, name, description, authors, manual section).
233233
man_pages = [
234-
('index', 'pep257', u'pep257 Documentation',
235-
[u'Vladimir Keleshev'], 1)
234+
('index', 'pydocstyle', u'pydocstyle Documentation',
235+
[u'Amir Rachum'], 1)
236236
]
237237

238238
# If true, show URL addresses after external links.
@@ -245,8 +245,8 @@
245245
# (source start file, target name, title, author,
246246
# dir menu entry, description, category)
247247
texinfo_documents = [
248-
('index', 'pep257', u'pep257 Documentation',
249-
u'Vladimir Keleshev', 'pep257', 'One line description of project.',
248+
('index', 'pydocstyle', u'pydocstyle Documentation',
249+
u'Amir Rachum', 'pydocstyle', 'Docstring style checker',
250250
'Miscellaneous'),
251251
]
252252

@@ -264,11 +264,11 @@
264264

265265
# sphinxcontrib.issuetracker settings
266266
issuetracker = 'github'
267-
issuetracker_project = 'GreenSteam/pep257'
267+
issuetracker_project = 'PyCQA/pydocstyle'
268268

269269

270270
def generate_error_code_table():
271-
from pep257 import ErrorRegistry
271+
from pydocstyle import ErrorRegistry
272272
with open(os.path.join('snippets', 'error_code_table.rst'), 'wt') as outf:
273273
outf.write(ErrorRegistry.to_rst())
274274

docs/index.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
.. pep257 documentation master file, created by
2-
sphinx-quickstart on Fri Jan 30 20:30:42 2015.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
1+
pydocstyle's documentation
2+
==========================
53

6-
pep257's documentation
7-
======================
4+
(formerly pep257)
85

9-
**pep257** is a static analysis tool for checking
10-
compliance with Python `PEP 257
11-
<http://www.python.org/dev/peps/pep-0257/>`_.
6+
**pydocstyle** is a static analysis tool for checking compliance with Python
7+
docstring conventions.
8+
9+
**pydocstyle** supports most of
10+
`PEP 257 <http://www.python.org/dev/peps/pep-0257/>`_ out of the box, but it
11+
should not be considered a reference implementation.
1212

1313

1414
.. include:: quickstart.rst
@@ -28,7 +28,8 @@ Contents:
2828
Credits
2929
=======
3030

31-
Created by Vladimir Keleshev.
31+
pydocstyle is a rename and continuation of pep257, a project created by
32+
Vladimir Keleshev.
3233

3334
Maintained by Amir Rachum.
3435

docs/quickstart.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ Quick Start
55

66
.. code::
77
8-
pip install pep257
8+
pip install pydocstyle
99
1010
2. Run
1111

1212
.. code::
1313
14-
$ pep257 test.py
14+
$ pydocstyle test.py
1515
test.py:18 in private nested class `meta`:
1616
D101: Docstring missing
1717
test.py:22 in public method `method`:

docs/release_notes.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,22 @@ New Features
1818

1919
Bug Fixes
2020

21-
* Fixed an issue where a ``NameError`` was raised when parsing complex defintions
22-
of ``__all__`` (#142, #143).
21+
* Fixed an issue where a ``NameError`` was raised when parsing complex
22+
definitions of ``__all__`` (#142, #143).
2323

2424
* Fixed a bug where D202 was falsely reported when a function with just a
2525
docstring and no content was followed by a comment (#165).
2626

2727

28+
Older Versions
29+
==============
30+
31+
.. note::
32+
33+
Versions documented below are before renaming the project from **pep257**
34+
to **pydocstyle**.
35+
36+
2837
0.7.0 - October 9th, 2015
2938
-------------------------
3039

docs/snippets/config.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
``pep257`` supports `ini`-like configuration files. In order for ``pep257`` to
2-
use it, it must be named ``setup.cfg``, ``tox.ini``, ``.pep257``, or
3-
``.pep257rc`` and have a ``[pep257]`` section.
4-
5-
When searching for a configuration file, ``pep257`` looks for one of the file
6-
specified above `in that exact order`. If a configuration file was not found,
7-
it keeps looking for one up the directory tree until one is found or uses
1+
``pydocstyle`` supports *ini*-like configuration files.
2+
In order for ``pydocstyle`` to use it, it must be named one of the following
3+
options, and have a ``[pydocstyle]`` section.
4+
5+
* ``setup.cfg``
6+
* ``tox.ini``
7+
* ``.pydocstyle``
8+
* ``.pydocstylerc``
9+
10+
When searching for a configuration file, ``pydocstyle`` looks for one of the
11+
file specified above *in that exact order*. If a configuration file was not
12+
found,it keeps looking for one up the directory tree until one is found or uses
813
the default configuration.
914

15+
.. deprecated::
16+
17+
For backwards compatibility purposes, **pydocstyle** supports configuration
18+
files named ``.pep257`` and ``.pep257rc``, as well as section header
19+
``[pep257]``. However, these are considered deprecated and support will be
20+
removed in version 2.0.0.
21+
1022
Available Options
1123
#################
1224

@@ -26,14 +38,14 @@ See the :ref:`cli_usage` section for more information.
2638
Inheritance
2739
###########
2840

29-
By default, when finding a configuration file, ``pep257`` tries to inherit
41+
By default, when finding a configuration file, ``pydocstyle`` tries to inherit
3042
the parent directory's configuration and merge them to the local ones.
3143

3244
The merge process is as follows:
3345

3446
* If one of ``select``, ``ignore`` or ``convention`` was specified in the child
3547
configuration - Ignores the parent configuration and set the new error codes
36-
to check. Othewise, Simply copies the parent checked error codes.
48+
to check. Otherwise, simply copies the parent checked error codes.
3749
* If ``add-ignore`` or ``add-select`` were specified, adds or removes the
3850
specified error codes from the checked error codes list.
3951
* If ``match`` or ``match-dir`` were specified - use them. Otherwise, use the
@@ -54,7 +66,7 @@ Example
5466

5567
.. code::
5668
57-
[pep257]
69+
[pydocstyle]
5870
inherit = false
5971
ignore = D100,D203,D405
6072
match = *.py

docs/snippets/install.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
Use `pip <http://pip-installer.org>`_ or easy_install::
1+
Use `pip <http://pip-installer.org>`_ or easy_install:
22

3-
pip install pep257
43

5-
Alternatively, you can use ``pep257.py`` source file
6-
directly--it is self-contained.
4+
.. code::
5+
6+
pip install pydocstyle
7+
8+
Alternatively, you can use ``pydocstyle.py`` source file
9+
directly - it is self-contained.

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-r requirements/docs.txt
2+
-r requirements/tests.txt

setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
from setuptools import setup
44

55

6-
with open(os.path.join('src', 'pep257.py')) as f:
6+
with open(os.path.join('src', 'pydocstyle.py')) as f:
77
for line in f:
88
if line.startswith('__version__'):
99
version = eval(line.split('=')[-1])
1010

1111

1212
setup(
13-
name='pep257',
13+
name='pydocstyle',
1414
version=version,
1515
description="Python docstring style checker",
1616
long_description=open('README.rst').read(),
1717
license='MIT',
18-
author='Vladimir Keleshev',
19-
url='https://github.com/GreenSteam/pep257/',
18+
author='Amir Rachum',
19+
url='https://github.com/PyCQA/pydocstyle/',
2020
classifiers=[
2121
'Intended Audience :: Developers',
2222
'Environment :: Console',
@@ -25,12 +25,13 @@
2525
'Operating System :: OS Independent',
2626
'License :: OSI Approved :: MIT License',
2727
],
28-
keywords='PEP 257, pep257, PEP 8, pep8, docstrings',
28+
keywords='pydocstyle, PEP 257, pep257, PEP 8, pep8, docstrings',
2929
package_dir={'': 'src'},
30-
py_modules=['pep257'],
30+
py_modules=['pydocstyle'],
3131
entry_points={
3232
'console_scripts': [
33-
'pep257 = pep257:main',
33+
'pydocstyle = pydocstyle:main',
34+
'pep257 = pydocstyle:main_pep257',
3435
],
3536
},
3637
)

0 commit comments

Comments
 (0)