Skip to content

Commit 4404a2f

Browse files
committed
rm trailing whitespace
1 parent a6b7f9b commit 4404a2f

66 files changed

Lines changed: 777 additions & 777 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/robot/common/handlers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121

2222
class BaseHandler:
23-
23+
2424
def __getattr__(self, name):
2525
if name == 'longname':
2626
return '%s.%s' % (self.library.name, self.name)
2727
if name == 'shortdoc':
2828
return self.doc and self.doc.splitlines()[0] or ''
29-
raise AttributeError("%s does not have attribute '%s'"
29+
raise AttributeError("%s does not have attribute '%s'"
3030
% (self.__class__.__name__, name))
31-
31+
3232
def check_arg_limits(self, args):
3333
if not self.minargs <= len(args) <= self.maxargs:
3434
self._raise_inv_args(args)
@@ -57,18 +57,18 @@ def _tracelog_args(self, logger, args):
5757

5858
class UserErrorHandler:
5959
"""Created if creating handlers fail -- running raises DataError.
60-
60+
6161
The idea is not to raise DataError at processing time and prevent all
6262
tests in affected test case file from executing. Instead UserErrorHandler
6363
is created and if it is ever run DataError is raised then.
6464
"""
6565
type = 'error'
66-
66+
6767
def __init__(self, name, error):
6868
self.name = self.longname = name
6969
self.doc = self.shortdoc = ''
7070
self._error = error
7171
self.timeout = ''
72-
72+
7373
def run(self, *args):
7474
raise DataError(self._error)

src/robot/common/keyword.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class BaseKeyword:
20-
20+
2121
def __init__(self, name='', args=None, doc='', timeout='', type='kw'):
2222
self.name = name
2323
self.args = utils.to_list(args)

src/robot/common/libraries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class BaseLibrary:
20-
20+
2121
def get_handler(self, name):
2222
try:
2323
return self.handlers[name]
@@ -26,6 +26,6 @@ def get_handler(self, name):
2626

2727
def has_handler(self, name):
2828
return self.handlers.has_key(name)
29-
29+
3030
def __len__(self):
3131
return len(self.handlers)

src/robot/common/model.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222

2323
class _TestAndSuiteHelper:
24-
24+
2525
def __init__(self, name, parent=None):
2626
self.name = name
2727
self.doc = ''
2828
self.parent = parent
29-
self.setup = None
29+
self.setup = None
3030
self.teardown = None
3131
self.status = 'NOT_RUN'
3232
self.message = ''
@@ -36,7 +36,7 @@ def __getattr__(self, name):
3636
return utils.html_escape(self.doc, formatting=True)
3737
if name == 'longname':
3838
return self.get_long_name()
39-
raise AttributeError("%s does not have attribute '%s'"
39+
raise AttributeError("%s does not have attribute '%s'"
4040
% (self.__class__.__name__, name))
4141

4242
def get_long_name(self, split_level=-1, separator='.'):
@@ -61,7 +61,7 @@ def _set_teardown_fail_msg(self, message):
6161

6262
def __str__(self):
6363
return self.name
64-
64+
6565
def __repr__(self):
6666
return "'%s'" % self.name
6767

@@ -155,7 +155,7 @@ def _get_counts(self, stat):
155155

156156
def set_status(self):
157157
"""Sets status and statistics based on subsuite and test statuses.
158-
158+
159159
Can/should be used when statuses have been changed somehow.
160160
"""
161161
self._set_stats()
@@ -169,7 +169,7 @@ def _set_stats(self):
169169
self._add_suite_to_stats(suite)
170170
for test in self.tests:
171171
self._add_test_to_stats(test)
172-
172+
173173
def _add_test_to_stats(self, test):
174174
self.all_stats.add_test(test)
175175
if test.critical == 'yes':
@@ -210,7 +210,7 @@ def filter_by_names(self, suites=None, tests=None):
210210

211211
def _filter_by_names(self, suites, tests):
212212
suites = self._filter_suite_names(suites)
213-
self.suites = [ suite for suite in self.suites
213+
self.suites = [ suite for suite in self.suites
214214
if suite._filter_by_names(suites, tests) ]
215215
if not suites:
216216
self.tests = [ test for test in self.tests if tests == [] or
@@ -253,9 +253,9 @@ def filter_by_tags(self, includes=None, excludes=None):
253253
self._raise_no_tests_filtered_by_tags(includes, excludes)
254254

255255
def _filter_by_tags(self, incls, excls):
256-
self.suites = [ suite for suite in self.suites
256+
self.suites = [ suite for suite in self.suites
257257
if suite._filter_by_tags(incls, excls) ]
258-
self.tests = [ test for test in self.tests
258+
self.tests = [ test for test in self.tests
259259
if test.is_included(incls, excls) ]
260260
return len(self.suites) + len(self.tests) > 0
261261

@@ -346,8 +346,8 @@ def is_included(self, incl_tags, excl_tags):
346346

347347
def _matches_any_of_the(self, tag_rules):
348348
"""Returns True if any of tag_rules matches self.tags
349-
350-
Matching equals supporting AND, & and NOT boolean operators and simple
349+
350+
Matching equals supporting AND, & and NOT boolean operators and simple
351351
pattern matching. NOT is 'or' operation meaning if any of the NOTs is
352352
matching, False is returned.
353353
"""
@@ -383,7 +383,7 @@ def _split_nots(self, tag_rule):
383383
def _contains_any_tag(self, tags):
384384
"""Returns True if any of the given tags matches a tag from self.tags.
385385
386-
Note that one tag may be ANDed combination of multiple tags (e.g.
386+
Note that one tag may be ANDed combination of multiple tags (e.g.
387387
tag1&tag2) and then all of them must match some tag from selg.tags.
388388
"""
389389
for tag in tags:
@@ -394,7 +394,7 @@ def _contains_any_tag(self, tags):
394394
def _contains_tag(self, tag):
395395
"""Returns True if given tag matches any tag from self.tags.
396396
397-
Note that given tag may be ANDed combination of multiple tags (e.g.
397+
Note that given tag may be ANDed combination of multiple tags (e.g.
398398
tag1&tag2) and then all of them must match some tag from selg.tags.
399399
"""
400400
for item in tag.split('&'):
@@ -424,7 +424,7 @@ def serialize(self, serializer):
424424

425425
def _get_name_slice_index(self, name_parts_count, split_level):
426426
if name_parts_count == split_level + 1:
427-
return split_level + 1
427+
return split_level + 1
428428
return split_level
429429

430430

src/robot/common/statistics.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020

2121
class Statistics:
22-
23-
def __init__(self, suite, suite_stat_level=-1, tag_stat_include=None,
22+
23+
def __init__(self, suite, suite_stat_level=-1, tag_stat_include=None,
2424
tag_stat_exclude=None, tag_stat_combine=None, tag_doc=None,
2525
tag_stat_link=None):
26-
self.tags = TagStatistics(tag_stat_include, tag_stat_exclude,
26+
self.tags = TagStatistics(tag_stat_include, tag_stat_exclude,
2727
tag_stat_combine, tag_doc, tag_stat_link)
2828
self.suite = SuiteStatistics(suite, self.tags, suite_stat_level)
2929
self.total = TotalStatistics(self.suite)
@@ -38,14 +38,14 @@ def serialize(self, serializer):
3838

3939

4040
class Stat:
41-
41+
4242
def __init__(self, name=None, doc=None, link=None):
4343
self.name = name
4444
self._doc = doc
4545
self._link = link
4646
self.passed = 0
4747
self.failed = 0
48-
48+
4949
def add_stat(self, other):
5050
self.passed += other.passed
5151
self.failed += other.failed
@@ -54,15 +54,15 @@ def add_test(self, test):
5454
if test.status == 'PASS':
5555
self.passed += 1
5656
else:
57-
self.failed += 1
58-
57+
self.failed += 1
58+
5959
def fail_all(self):
6060
self.failed += self.passed
6161
self.passed = 0
6262

6363
def get_doc(self, split_level=-1):
6464
return self._doc
65-
65+
6666
def get_link(self, split_level=-1):
6767
return self._link
6868

@@ -83,24 +83,24 @@ def get_doc(self, split_level=-1):
8383

8484
def get_link(self, split_level=-1):
8585
return self.get_long_name(split_level)
86-
86+
8787
def serialize(self, serializer):
8888
serializer.suite_stat(self)
89-
89+
9090

9191
class TagStat(Stat):
9292

9393
type = 'tag'
94-
94+
9595
def __init__(self, name, critical=False, non_critical=False, info=None):
96-
doc = info and info.get_doc(name) or None
96+
doc = info and info.get_doc(name) or None
9797
Stat.__init__(self, name, doc, link=name)
9898
self.critical = critical
9999
self.non_critical = non_critical
100100
self.combined = False
101101
self.tests = []
102102
self.links = info and info.get_links(name) or []
103-
103+
104104
def add_test(self, test):
105105
Stat.add_test(self, test)
106106
self.tests.append(test)
@@ -119,12 +119,12 @@ def serialize(self, serializer):
119119

120120

121121
class CombinedTagStat(TagStat):
122-
122+
123123
def __init__(self, name):
124124
TagStat.__init__(self, name)
125125
self.combined = True
126126

127-
127+
128128
class TotalStat(Stat):
129129

130130
type = 'total'
@@ -139,36 +139,36 @@ def serialize(self, serializer):
139139

140140

141141
class SuiteStatistics:
142-
142+
143143
def __init__(self, suite, tag_stats, suite_stat_level=-1):
144144
self.all = SuiteStat(suite)
145145
self.critical = SuiteStat(suite)
146146
self.suites = []
147147
self._process_suites(suite, tag_stats)
148148
self._process_tests(suite, tag_stats)
149149
self._suite_stat_level = suite_stat_level
150-
150+
151151
def _process_suites(self, suite, tag_stats):
152152
for subsuite in suite.suites:
153153
substat = SuiteStatistics(subsuite, tag_stats)
154154
self.suites.append(substat)
155155
self.all.add_stat(substat.all)
156156
self.critical.add_stat(substat.critical)
157-
157+
158158
def _process_tests(self, suite, tag_stats):
159159
for test in suite.tests:
160160
self.all.add_test(test)
161161
if test.critical == 'yes':
162162
self.critical.add_test(test)
163163
tag_stats.add_test(test, suite.critical)
164-
164+
165165
def serialize(self, serializer):
166166
if self._suite_stat_level == 0:
167167
return
168168
serializer.start_suite_stats(self)
169169
self._serialize(serializer, self._suite_stat_level)
170170
serializer.end_suite_stats(self)
171-
171+
172172
def _serialize(self, serializer, max_suite_level, suite_level=1):
173173
self.all.serialize(serializer)
174174
if max_suite_level < 0 or max_suite_level > suite_level:
@@ -251,20 +251,20 @@ def sort(self):
251251

252252

253253
class TotalStatistics:
254-
255-
def __init__(self, suite):
254+
255+
def __init__(self, suite):
256256
self.critical = TotalStat('Critical Tests', suite.critical)
257257
self.all = TotalStat('All Tests', suite.all)
258-
258+
259259
def serialize(self, serializer):
260260
serializer.start_total_stats(self)
261261
self.critical.serialize(serializer)
262262
self.all.serialize(serializer)
263263
serializer.end_total_stats(self)
264-
265-
264+
265+
266266
class TagStatInfo:
267-
267+
268268
def __init__(self, docs, links):
269269
self._docs = [ self._parse_doc(doc) for doc in docs ]
270270
self._links = [ TagStatLink(*link) for link in links ]
@@ -285,24 +285,24 @@ def get_doc(self, tag):
285285

286286
def get_links(self, tag):
287287
links = [ link.get_link(tag) for link in self._links ]
288-
return [ link for link in links if link is not None ]
289-
290-
288+
return [ link for link in links if link is not None ]
289+
290+
291291
class TagStatLink:
292292
_match_pattern_tokenizer = re.compile('(\*|\?)')
293-
293+
294294
def __init__(self, pattern, link, title):
295-
self._regexp = self._get_match_regexp(pattern)
295+
self._regexp = self._get_match_regexp(pattern)
296296
self._link = link
297297
self._title = title.replace('_', ' ')
298-
298+
299299
def get_link(self, tag):
300300
match = self._regexp.match(tag)
301-
if match is not None:
301+
if match is not None:
302302
link = self._replace_matches(self._link, match)
303303
return link, self._title
304304
return None
305-
305+
306306
def _replace_matches(self, url, match):
307307
groups = match.groups()
308308
for i, group in enumerate(groups):

0 commit comments

Comments
 (0)