Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit597d36c

Browse files
committed
Fix typos
1 parentdb88100 commit597d36c

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

‎smmap/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Intialize the smmap package"""
1+
"""Initialize the smmap package"""
22

33
__author__="Sebastian Thiel"
44
__contact__="byronimo@gmail.com"

‎smmap/buf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SlidingWindowMapBuffer:
2121
)
2222

2323
def__init__(self,cursor=None,offset=0,size=sys.maxsize,flags=0):
24-
"""Initalize the instance to operate on the given cursor.
24+
"""Initialize the instance to operate on the given cursor.
2525
:param cursor: if not None, the associated cursor to the file you want to access
2626
If None, you have call begin_access before using the buffer and provide a cursor
2727
:param offset: absolute offset in bytes

‎smmap/mman.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class WindowCursor:
2727
that it must be suited for the somewhat quite different sliding manager. It could be improved, but
2828
I see no real need to do so."""
2929
__slots__= (
30-
'_manager',# themanger keeping all file regions
30+
'_manager',# themanager keeping all file regions
3131
'_rlist',# a regions list with regions for our file
3232
'_region',# our current class:`MapRegion` or None
3333
'_ofs',# relative offset from the actually mapped area to our start area
@@ -66,7 +66,7 @@ def _destroy(self):
6666
# sometimes, during shutdown, getrefcount is None. Its possible
6767
# to re-import it, however, its probably better to just ignore
6868
# this python problem (for now).
69-
# The next step is to get rid of the error prone getrefcountalltogether.
69+
# The next step is to get rid of the error prone getrefcountaltogether.
7070
pass
7171
# END exception handling
7272
# END handle regions
@@ -95,7 +95,7 @@ def __copy__(self):
9595
#{ Interface
9696
defassign(self,rhs):
9797
"""Assign rhs to this instance. This is required in order to get a real copy.
98-
Alternativly, you can copy an existing instance using the copy module"""
98+
Alternatively, you can copy an existing instance using the copy module"""
9999
self._destroy()
100100
self._copy_from(rhs)
101101

@@ -342,7 +342,7 @@ def _collect_lru_region(self, size):
342342
returnnum_found
343343

344344
def_obtain_region(self,a,offset,size,flags,is_recursive):
345-
"""Utilty to create a new region - for more information on the parameters,
345+
"""Utility to create a new region - for more information on the parameters,
346346
see MapCursor.use_region.
347347
:param a: A regions (a)rray
348348
:return: The newly created region"""
@@ -427,7 +427,7 @@ def mapped_memory_size(self):
427427
returnself._memory_size
428428

429429
defmax_file_handles(self):
430-
""":return:maximium amount of handles we may have opened"""
430+
""":return:maximum amount of handles we may have opened"""
431431
returnself._max_handle_count
432432

433433
defmax_mapped_memory_size(self):

‎smmap/test/test_buf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_basics(self):
3030
self.assertRaises(ValueError,SlidingWindowMapBuffer,type(c)())# invalid cursor
3131
self.assertRaises(ValueError,SlidingWindowMapBuffer,c,fc.size)# offset too large
3232

33-
buf=SlidingWindowMapBuffer()# can createuninitailized buffers
33+
buf=SlidingWindowMapBuffer()# can createuninitialized buffers
3434
assertbuf.cursor()isNone
3535

3636
# can call end access any time

‎smmap/test/test_mman.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def test_memman_operation(self):
154154
ifman.window_size():
155155
assertman.num_file_handles()==2
156156
assertc.size()<size
157-
assertc.region()isnotrr# old region is still available, but has notcurser ref anymore
157+
assertc.region()isnotrr# old region is still available, but has notcursor ref anymore
158158
assertrr.client_count()==1# only held by manager
159159
else:
160160
assertc.size()<fc.size
@@ -194,7 +194,7 @@ def test_memman_operation(self):
194194
# precondition
195195
ifman.window_size():
196196
assertmax_mapped_memory_size>=mapped_memory_size()
197-
# ENDstatics will overshoot, which is fine
197+
# ENDstatistics will overshoot, which is fine
198198
assertmax_file_handles>=num_file_handles()
199199
assertc.use_region(base_offset, (sizeorc.size())).is_valid()
200200
csize=c.size()
@@ -205,7 +205,7 @@ def test_memman_operation(self):
205205
assertincludes_ofs(base_offset+csize-1)
206206
assertnotincludes_ofs(base_offset+csize)
207207
# END while we should do an access
208-
elapsed=max(time()-st,0.001)# prevent zerodivison errors on windows
208+
elapsed=max(time()-st,0.001)# prevent zerodivision errors on windows
209209
mb=float(1000*1000)
210210
print("%s: Read %i mb of memory with %i random on cursor initialized with %s accesses in %fs (%f mb/s)\n"
211211
% (mtype,memory_read/mb,max_random_accesses,type(item),elapsed, (memory_read/mb)/elapsed),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp