Skip to content

Commit 189395f

Browse files
Merge pull request #472 from tie-rack/normalize-io-docstrings
Normalize docstrings in io-related namespaces
2 parents a47cc3e + 5fa954e commit 189395f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

pixie/io-blocking.pxi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
(common/stream-reducer this f init)))
3939

4040
(defn open-read
41-
{:doc "Open a file for reading, returning a IInputStream"
41+
{:doc "Opens a file for reading. Returns an IInputStream."
4242
:added "0.1"}
4343
[filename]
4444
(assert (string? filename) "Filename must be a string")
4545
(->FileStream (fopen filename "r")))
4646

4747
(defn read-line
48-
"Read one line from input-stream for each invocation.
49-
nil when all lines have been read"
48+
"Reads one line from input-stream for each invocation.
49+
Returns nil when all lines have been read."
5050
[input-stream]
5151
(let [line-feed (into #{} (map int [\newline \return]))
5252
buf (buffer 1)]
@@ -62,7 +62,7 @@
6262

6363
(defn line-seq
6464
"Returns the lines of text from input-stream as a lazy sequence of strings.
65-
input-stream must implement IInputStream"
65+
input-stream must implement IInputStream."
6666
[input-stream]
6767
(when-let [line (read-line input-stream)]
6868
(cons line (lazy-seq (line-seq input-stream)))))
@@ -131,7 +131,7 @@
131131
(common/stream-reducer this f init)))
132132

133133
(defn popen-read
134-
{:doc "Open a file for reading, returning a IInputStream"
134+
{:doc "Opens a file for reading. Returns an IInputStream."
135135
:added "0.1"}
136136
[command]
137137
(assert (string? command) "Command must be a string")

pixie/io.pxi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
(common/stream-reducer this f init)))
4242

4343
(defn open-read
44-
{:doc "Open a file for reading, returning a IInputStream"
44+
{:doc "Opens a file for reading. Returns an IInputStream."
4545
:added "0.1"}
4646
[filename]
4747
(assert (string? filename) "Filename must be a string")
@@ -95,15 +95,15 @@
9595
(throw [::Exception "Expected a LineReader, UTF8InputStream, or BufferedInputStream"])))
9696

9797
(defn read-line
98-
"Read one line from input-stream for each invocation.
99-
nil when all lines have been read.
98+
"Reads one line from input-stream for each invocation.
99+
Returns nil when all lines have been read.
100100
Pass a BufferedInputStream for best performance."
101101
[input-stream]
102102
(-read-line (line-reader input-stream)))
103103

104104
(defn line-seq
105105
"Returns the lines of text from input-stream as a lazy sequence of strings.
106-
input-stream must implement IInputStream"
106+
input-stream must implement IInputStream."
107107
[input-stream]
108108
(let [lr (line-reader input-stream)]
109109
(when-let [line (-read-line lr)]
@@ -213,7 +213,7 @@
213213
result)
214214

215215
(defn open-write
216-
{:doc "Open a file for writing, returning a IOutputStream"
216+
{:doc "Opens a file for writing. Returns an IOutputStream."
217217
:added "0.1"}
218218
[filename]
219219
(assert (string? filename) "Filename must be a string")
@@ -244,8 +244,8 @@
244244

245245
:else (throw [::Exception "Expected a string or IOutputStream"])))
246246

247-
(defn slurp
248-
"Reads in the contents of input. Input must be a filename or an IInputStream"
247+
(defn slurp
248+
"Reads in the contents of input. Input must be a filename or an IInputStream."
249249
[input]
250250
(let [stream (cond
251251
(string? input) (open-read input)

pixie/io/tcp.pxi

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

6565

6666
(defn tcp-client
67-
"Creates a TCP connection to the given ip (as a string) and port (an integer). Will return a TCPStream"
67+
"Creates a TCP connection to the given ip (as a string) and port (an integer). Returns a TCPStream."
6868
[ip port]
6969
(let [client-addr (uv/sockaddr_in)
7070
uv-connect (uv/uv_connect_t)

0 commit comments

Comments
 (0)