mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
Turn the comment into a docstring
This commit is contained in:
parent
bb385d45f7
commit
9788857df6
@ -37,13 +37,21 @@ class RunPP(protocol.ProcessProtocol):
|
||||
|
||||
|
||||
def make_matcher(options):
|
||||
# A deprecation warning line looks something like this:
|
||||
#
|
||||
# somepath/foo/bar/baz.py:43: DeprecationWarning: Foo is deprecated, try bar instead.
|
||||
#
|
||||
# Sadly there is no guarantee warnings begin at the beginning of a line
|
||||
# since they are written to output without coordination with whatever
|
||||
# other Python code is running in the process.
|
||||
"""
|
||||
Make a function that matches a line with a relevant deprecation.
|
||||
|
||||
A deprecation warning line looks something like this::
|
||||
|
||||
somepath/foo/bar/baz.py:43: DeprecationWarning: Foo is deprecated, try bar instead.
|
||||
|
||||
Sadly there is no guarantee warnings begin at the beginning of a line
|
||||
since they are written to output without coordination with whatever other
|
||||
Python code is running in the process.
|
||||
|
||||
:return: A one-argument callable that accepts a string and returns
|
||||
``True`` if it contains an interesting warning and ``False``
|
||||
otherwise.
|
||||
"""
|
||||
pattern = r".*\.py[oc]?:\d+:" # (Pending)?DeprecationWarning: .*"
|
||||
if options["package"]:
|
||||
pattern = r".*/{}/".format(
|
||||
|
Loading…
x
Reference in New Issue
Block a user