Skip to content

Commit 8ad16f3

Browse files
Bump black from 19.10b0 to 21.5b2 (HunterMcGushion#70)
* Bump black from 19.10b0 to 21.5b2 Bumps [black](https://github.com/psf/black) from 19.10b0 to 21.5b2. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * run black 21.5b2 and update .pre-commit-config.yaml Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Weiss <code@mweiss.ch>
1 parent 60b8683 commit 8ad16f3

File tree

5 files changed

+67
-62
lines changed

5 files changed

+67
-62
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/ambv/black
3-
rev: 19.10b0
3+
rev: 21.5b2
44
hooks:
55
- id: black
66
language_version: python3.7

docstr_coverage/coverage.py

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -136,66 +136,66 @@ def get_docstring_coverage(
136136
ignore_names: Tuple[List[str], ...] = (),
137137
) -> Tuple[Dict, Dict]:
138138
"""Checks contents of `filenames` for missing docstrings, and produces a report
139-
detailing docstring status.
139+
detailing docstring status.
140140
141-
*Note*:
142-
For a method with a more expressive return type,
143-
you may want to try the experimental `docstr_coverage.analyze`
144-
function.
141+
*Note*:
142+
For a method with a more expressive return type,
143+
you may want to try the experimental `docstr_coverage.analyze`
144+
function.
145145
146-
Parameters
147-
----------
148-
filenames: List
149-
List of filename strings that are absolute or relative paths
150-
skip_magic: Boolean, default=False
151-
If True, skips all magic methods (double-underscore-prefixed),
152-
except '__init__' and does not include them in the report
153-
skip_file_docstring: Boolean, default=False
154-
If True, skips check for a module-level docstring
155-
skip_init: Boolean, default=False
156-
If True, skips methods named '__init__' and does not include
157-
them in the report
158-
skip_class_def: Boolean, default=False
159-
If True, skips class definitions and does not include them in the report.
160-
If this is True, the class's methods will still be checked
161-
skip_private: Boolean, default=False
162-
If True, skips function definitions beginning with a single underscore and does
163-
not include them in the report.
164-
verbose: Int in [0, 1, 2, 3], default=0
165-
0) No printing.
166-
1) Print total stats only.
167-
2) Print stats for all files.
168-
3) Print missing docstrings for all files.
169-
ignore_names: Tuple[List[str], ...], default=()
170-
Patterns to ignore when checking documentation. Each list in `ignore_names` defines a
171-
different pattern to be ignored. The first element in each list is the regular
172-
expression for matching filenames. All remaining arguments in each list are
173-
regexes for matching names of functions/classes. A node is ignored if it
174-
matches the filename regex and at least one of the remaining regexes
175-
176-
Returns
177-
-------
178-
Dict
179-
Links filename keys to a dict of stats for that filename. Example:
180-
181-
>>> {
182-
... '<filename>': {
183-
... 'missing': ['<method_or_class_name>', '...'],
184-
... 'module_doc': '<Boolean>',
185-
... 'missing_count': '<missing_count int>',
186-
... 'needed_count': '<needed_docstrings_count int>',
187-
... 'coverage': '<percent_of_coverage float>',
188-
... 'empty': '<Boolean>'
189-
... }, ...
190-
... }
191-
Dict
192-
Total summary stats for all files analyzed. Example:
193-
194-
>>> {
195-
... 'missing_count': '<total_missing_count int>',
196-
... 'needed_count': '<total_needed_docstrings_count int>',
197-
... 'coverage': '<total_percent_of_coverage float>'
198-
... }"""
146+
Parameters
147+
----------
148+
filenames: List
149+
List of filename strings that are absolute or relative paths
150+
skip_magic: Boolean, default=False
151+
If True, skips all magic methods (double-underscore-prefixed),
152+
except '__init__' and does not include them in the report
153+
skip_file_docstring: Boolean, default=False
154+
If True, skips check for a module-level docstring
155+
skip_init: Boolean, default=False
156+
If True, skips methods named '__init__' and does not include
157+
them in the report
158+
skip_class_def: Boolean, default=False
159+
If True, skips class definitions and does not include them in the report.
160+
If this is True, the class's methods will still be checked
161+
skip_private: Boolean, default=False
162+
If True, skips function definitions beginning with a single underscore and does
163+
not include them in the report.
164+
verbose: Int in [0, 1, 2, 3], default=0
165+
0) No printing.
166+
1) Print total stats only.
167+
2) Print stats for all files.
168+
3) Print missing docstrings for all files.
169+
ignore_names: Tuple[List[str], ...], default=()
170+
Patterns to ignore when checking documentation. Each list in `ignore_names` defines a
171+
different pattern to be ignored. The first element in each list is the regular
172+
expression for matching filenames. All remaining arguments in each list are
173+
regexes for matching names of functions/classes. A node is ignored if it
174+
matches the filename regex and at least one of the remaining regexes
175+
176+
Returns
177+
-------
178+
Dict
179+
Links filename keys to a dict of stats for that filename. Example:
180+
181+
>>> {
182+
... '<filename>': {
183+
... 'missing': ['<method_or_class_name>', '...'],
184+
... 'module_doc': '<Boolean>',
185+
... 'missing_count': '<missing_count int>',
186+
... 'needed_count': '<needed_docstrings_count int>',
187+
... 'coverage': '<percent_of_coverage float>',
188+
... 'empty': '<Boolean>'
189+
... }, ...
190+
... }
191+
Dict
192+
Total summary stats for all files analyzed. Example:
193+
194+
>>> {
195+
... 'missing_count': '<total_missing_count int>',
196+
... 'needed_count': '<total_needed_docstrings_count int>',
197+
... 'coverage': '<total_percent_of_coverage float>'
198+
... }"""
199199
ignore_config = IgnoreConfig(
200200
skip_magic=skip_magic,
201201
skip_file_docstring=skip_file_docstring,

docstr_coverage/printers.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ def _print_file_statistics(self, results):
8383
count = file.count_aggregate()
8484
print_line(
8585
" Needed: %s; Found: %s; Missing: %s; Coverage: %.1f%%"
86-
% (count.needed, count.found, count.missing, count.coverage(),),
86+
% (
87+
count.needed,
88+
count.found,
89+
count.missing,
90+
count.coverage(),
91+
),
8792
)
8893
print_line()
8994
print_line()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def readme():
2727
packages=["docstr_coverage"],
2828
install_requires=["click", "PyYAML"],
2929
extras_require={
30-
"lint": ["flake8==3.9.2", "black==19.10b0", "isort==5.8.0"],
30+
"lint": ["flake8==3.9.2", "black==21.5b2", "isort==5.8.0"],
3131
"test": ["pytest==5.4.2", "pytest-mock==3.4.0"],
3232
},
3333
include_package_data=True,

tests/excused_samples/partially_excused.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def bar():
2323

2424

2525
class FooBarChild(FooBar):
26-
""" Wow! A docstring. Crazy """
26+
"""Wow! A docstring. Crazy"""
2727

2828
# docstr-coverage:inherited
2929
def function(self):

0 commit comments

Comments
 (0)