Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pycqa/pydocstyle
1 result
Show changes
Commits on Source (4)
Loading
Loading
@@ -17,6 +17,9 @@ Bug Fixes
 
* Fixed an issue where the ``--source`` flag would result in improperly
spaced output (#256, #257, #260).
* Fixed an issue where if a first word in a docstring had Unicode characters
and the docstring was not a unicode string, an exception would be raised
(#258, #264).
 
 
2.0.0 - April 18th, 2017
Loading
Loading
from __future__ import with_statement
import os
from setuptools import setup
 
# Do not update the version manually - it is managed by `bumpversion`.
Loading
Loading
Loading
Loading
@@ -372,7 +372,14 @@ class ConventionChecker(object):
if check_word in IMPERATIVE_BLACKLIST:
return violations.D401b(first_word)
 
correct_form = IMPERATIVE_VERBS.get(stem(check_word))
try:
correct_form = IMPERATIVE_VERBS.get(stem(check_word))
except UnicodeDecodeError:
# This is raised when the docstring contains unicode
# characters in the first word, but is not a unicode
# string. In which case D302 will be reported. Ignoring.
return
if correct_form and correct_form != check_word:
return violations.D401(
correct_form.capitalize(),
Loading
Loading
Loading
Loading
@@ -271,6 +271,10 @@ if sys.version_info[0] <= 2:
def unicode_unmarked():
"""Юникод."""
 
@expect('D302: Use u""" for Unicode docstrings')
def first_word_has_unicode_byte():
"""あy."""
 
@expect("D400: First line should end with a period (not 'y')")
def lwnlkjl():
Loading
Loading
@@ -376,5 +380,6 @@ def bad_decorated_function():
"""Bad (E501) but decorated"""
pass
 
expect(os.path.normcase(__file__ if __file__[-1] != 'c' else __file__[:-1]),
'D100: Missing docstring in public module')
Loading
Loading
@@ -11,7 +11,7 @@ envlist = py27, py33, py34, py35, pypy, docs
setenv =
LANG=C
LC_ALL=C
commands = py.test --pep8 --cache-clear -v src/tests
commands = py.test --pep8 --cache-clear -vv src/tests
deps =
-rrequirements/runtime.txt
-rrequirements/tests.txt
Loading
Loading