summaryrefslogtreecommitdiffstats
path: root/platform_utils.py
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2020-02-12 15:20:19 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2020-02-12 06:36:40 +0000
commit819827a42ddb364f98c3a1a7eae2536dc54bc4cc (patch)
treefe6bdca5ff7e44d53595a6da76d2b56ea659eee1 /platform_utils.py
parentabdf7500612f1d115863ba8f026ddbea1e5a1f28 (diff)
downloadgit-repo-819827a42ddb364f98c3a1a7eae2536dc54bc4cc.tar.gz
Fix blank line issues reported by flake8
- E301 expected 1 blank line - E302 expected 2 blank lines - E303 too many blank lines - E305 expected 2 blank lines after class or function definition - E306 expected 1 blank line before a nested definition Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place \ --select E301,E302,E303,E305,E306 Manually fix issues in project.py caused by misuse of block comments. Change-Id: Iee840fcaff48aae504ddac9c3e76d2acd484f6a9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254599 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
Diffstat (limited to 'platform_utils.py')
-rw-r--r--platform_utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform_utils.py b/platform_utils.py
index 06ef9b18..490ba208 100644
--- a/platform_utils.py
+++ b/platform_utils.py
@@ -92,6 +92,7 @@ class _FileDescriptorStreamsNonBlocking(FileDescriptorStreams):
92 """ 92 """
93 class Stream(object): 93 class Stream(object):
94 """ Encapsulates a file descriptor """ 94 """ Encapsulates a file descriptor """
95
95 def __init__(self, fd, dest, std_name): 96 def __init__(self, fd, dest, std_name):
96 self.fd = fd 97 self.fd = fd
97 self.dest = dest 98 self.dest = dest
@@ -125,6 +126,7 @@ class _FileDescriptorStreamsThreads(FileDescriptorStreams):
125 non blocking I/O. This implementation requires creating threads issuing 126 non blocking I/O. This implementation requires creating threads issuing
126 blocking read operations on file descriptors. 127 blocking read operations on file descriptors.
127 """ 128 """
129
128 def __init__(self): 130 def __init__(self):
129 super(_FileDescriptorStreamsThreads, self).__init__() 131 super(_FileDescriptorStreamsThreads, self).__init__()
130 # The queue is shared accross all threads so we can simulate the 132 # The queue is shared accross all threads so we can simulate the
@@ -144,12 +146,14 @@ class _FileDescriptorStreamsThreads(FileDescriptorStreams):
144 146
145 class QueueItem(object): 147 class QueueItem(object):
146 """ Item put in the shared queue """ 148 """ Item put in the shared queue """
149
147 def __init__(self, stream, data): 150 def __init__(self, stream, data):
148 self.stream = stream 151 self.stream = stream
149 self.data = data 152 self.data = data
150 153
151 class Stream(object): 154 class Stream(object):
152 """ Encapsulates a file descriptor """ 155 """ Encapsulates a file descriptor """
156
153 def __init__(self, fd, dest, std_name, queue): 157 def __init__(self, fd, dest, std_name, queue):
154 self.fd = fd 158 self.fd = fd
155 self.dest = dest 159 self.dest = dest