We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2718256 commit 0ded442Copy full SHA for 0ded442
python2/runner/writeln_decorator.py
@@ -1,19 +1,18 @@
1
#!/usr/bin/env python
2
# encoding: utf-8
3
4
-import sys
5
-import os
6
7
# Taken from legacy python unittest
8
class WritelnDecorator:
9
"""Used to decorate file-like objects with a handy 'writeln' method"""
10
- def __init__(self,stream):
+ def __init__(self, stream):
11
self.stream = stream
12
13
def __getattr__(self, attr):
14
return getattr(self.stream,attr)
15
16
def writeln(self, arg=None):
17
- if arg: self.write(arg)
18
- self.write('\n') # text-mode streams translate to \r\n if needed
+ if arg:
+ self.write(arg)
+ self.write('\n') # text-mode streams translate to \r\n if needed
19
0 commit comments