mirror of
https://github.com/curl/curl.git
synced 2026-07-29 15:52:21 +03:00
tests: make whitespace between functions and classes consistent
Mostly, this means two blank lines between classes and functions and one line between methods. Since these checks are currently in preview, they are done in a separate ruff invocation to avoid turning ALL the preview checks on at the same time.
This commit is contained in:
parent
98e470b3a8
commit
17e8200733
8 changed files with 23 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
REPLY_DATA = re.compile("<reply>[ \t\n\r]*<data[^<]*>(.*?)</data>", re.MULTILINE | re.DOTALL)
|
||||
|
||||
|
||||
class ClosingFileHandler(logging.StreamHandler):
|
||||
def __init__(self, filename):
|
||||
super(ClosingFileHandler, self).__init__()
|
||||
|
|
@ -59,6 +60,7 @@ class ClosingFileHandler(logging.StreamHandler):
|
|||
self.release()
|
||||
return result
|
||||
|
||||
|
||||
class TestData:
|
||||
def __init__(self, data_folder):
|
||||
self.data_folder = data_folder
|
||||
|
|
@ -80,6 +82,7 @@ class TestData:
|
|||
# Left-strip the data so we do not get a newline before our data.
|
||||
return m.group(1).lstrip()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
td = TestData("./data")
|
||||
data = td.get_test_data(1451)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue