diff options
author | Kian-Meng Ang <kianmeng@cpan.org> | 2022-01-05 21:58:22 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-01-06 08:50:11 +0800 |
commit | 2913a6454c9dfc803679dc5f75315e2d821ee977 (patch) | |
tree | cc639a0d9ae1890840f35e39a977c413eeb19d03 | |
parent | 9a289258074fbf92a64186274067a46f7b27666e (diff) | |
download | gitdb-2913a6454c9dfc803679dc5f75315e2d821ee977.tar.gz |
Fix typos
-rw-r--r-- | gitdb/__init__.py | 2 | ||||
-rw-r--r-- | gitdb/db/pack.py | 2 | ||||
-rw-r--r-- | gitdb/fun.py | 8 | ||||
-rw-r--r-- | gitdb/pack.py | 4 | ||||
-rw-r--r-- | gitdb/stream.py | 2 | ||||
-rw-r--r-- | gitdb/test/db/lib.py | 2 | ||||
-rw-r--r-- | gitdb/test/db/test_pack.py | 2 | ||||
-rw-r--r-- | gitdb/test/test_pack.py | 2 | ||||
-rw-r--r-- | gitdb/util.py | 6 |
9 files changed, 15 insertions, 15 deletions
diff --git a/gitdb/__init__.py b/gitdb/__init__.py index 0d936db..b5d1939 100644 --- a/gitdb/__init__.py +++ b/gitdb/__init__.py @@ -21,7 +21,7 @@ def _init_externals(): except ImportError as e: raise ImportError("'%s' could not be imported, assure it is located in your PYTHONPATH" % module) from e # END verify import - # END handel imports + # END handle imports #} END initialization diff --git a/gitdb/db/pack.py b/gitdb/db/pack.py index 177ed7b..90de02b 100644 --- a/gitdb/db/pack.py +++ b/gitdb/db/pack.py @@ -131,7 +131,7 @@ class PackedDB(FileDBBase, ObjectDBR, CachingDB, LazyMixin): def update_cache(self, force=False): """ - Update our cache with the acutally existing packs on disk. Add new ones, + Update our cache with the actually existing packs on disk. Add new ones, and remove deleted ones. We keep the unchanged ones :param force: If True, the cache will be updated even though the directory diff --git a/gitdb/fun.py b/gitdb/fun.py index 9846597..abb4277 100644 --- a/gitdb/fun.py +++ b/gitdb/fun.py @@ -103,7 +103,7 @@ def delta_chunk_apply(dc, bbuf, write): write(bbuf[dc.so:dc.so + dc.ts]) else: # APPEND DATA - # whats faster: if + 4 function calls or just a write with a slice ? + # what's faster: if + 4 function calls or just a write with a slice ? # Considering data can be larger than 127 bytes now, it should be worth it if dc.ts < len(dc.data): write(dc.data[:dc.ts]) @@ -292,7 +292,7 @@ class DeltaChunkList(list): """Verify the list has non-overlapping chunks only, and the total size matches target_size :param target_size: if not -1, the total size of the chain must be target_size - :raise AssertionError: if the size doen't match""" + :raise AssertionError: if the size doesn't match""" if target_size > -1: assert self[-1].rbound() == target_size assert reduce(lambda x, y: x + y, (d.ts for d in self), 0) == target_size @@ -331,7 +331,7 @@ class TopdownDeltaChunkList(DeltaChunkList): cannot be changed by any of the upcoming bases anymore. Once all our chunks are marked like that, we can stop all processing :param bdcl: data chunk list being one of our bases. They must be fed in - consequtively and in order, towards the earliest ancestor delta + consecutively and in order, towards the earliest ancestor delta :return: True if processing was done. Use it to abort processing of remaining streams if False is returned""" nfc = 0 # number of frozen chunks @@ -624,7 +624,7 @@ def apply_delta_data(src_buf, src_buf_size, delta_buf, delta_buf_size, write): :param src_buf: random access data from which the delta was created :param src_buf_size: size of the source buffer in bytes - :param delta_buf_size: size fo the delta buffer in bytes + :param delta_buf_size: size for the delta buffer in bytes :param delta_buf: random access delta data :param write: write method taking a chunk of bytes diff --git a/gitdb/pack.py b/gitdb/pack.py index a38468e..0b26c12 100644 --- a/gitdb/pack.py +++ b/gitdb/pack.py @@ -224,7 +224,7 @@ class IndexWriter(object): if ofs > 0x7fffffff: tmplist.append(ofs) ofs = 0x80000000 + len(tmplist) - 1 - # END hande 64 bit offsets + # END handle 64 bit offsets sha_write(pack('>L', ofs & 0xffffffff)) # END for each offset @@ -506,7 +506,7 @@ class PackFile(LazyMixin): """A pack is a file written according to the Version 2 for git packs As we currently use memory maps, it could be assumed that the maximum size of - packs therefor is 32 bit on 32 bit systems. On 64 bit systems, this should be + packs therefore is 32 bit on 32 bit systems. On 64 bit systems, this should be fine though. **Note:** at some point, this might be implemented using streams as well, or diff --git a/gitdb/stream.py b/gitdb/stream.py index d58d1a6..37380ad 100644 --- a/gitdb/stream.py +++ b/gitdb/stream.py @@ -289,7 +289,7 @@ class DecompressMemMapReader(LazyMixin): # They are thorough, and I assume it is truly working. # Why is this logic as convoluted as it is ? Please look at the table in # https://github.com/gitpython-developers/gitdb/issues/19 to learn about the test-results. - # Bascially, on py2.6, you want to use branch 1, whereas on all other python version, the second branch + # Basically, on py2.6, you want to use branch 1, whereas on all other python version, the second branch # will be the one that works. # However, the zlib VERSIONs as well as the platform check is used to further match the entries in the # table in the github issue. This is it ... it was the only way I could make this work everywhere. diff --git a/gitdb/test/db/lib.py b/gitdb/test/db/lib.py index 3df326b..b38f1d5 100644 --- a/gitdb/test/db/lib.py +++ b/gitdb/test/db/lib.py @@ -107,7 +107,7 @@ class TestDBBase(TestBase): # DIRECT STREAM COPY # our data hase been written in object format to the StringIO - # we pasesd as output stream. No physical database representation + # we passed as output stream. No physical database representation # was created. # Test direct stream copy of object streams, the result must be # identical to what we fed in diff --git a/gitdb/test/db/test_pack.py b/gitdb/test/db/test_pack.py index 458d804..ff96a58 100644 --- a/gitdb/test/db/test_pack.py +++ b/gitdb/test/db/test_pack.py @@ -80,7 +80,7 @@ class TestPackDB(TestDBBase): # END for each sha to find # we should have at least one ambiguous, considering the small sizes - # but in our pack, there is no ambigious ... + # but in our pack, there is no ambiguous ... # assert num_ambiguous # non-existing diff --git a/gitdb/test/test_pack.py b/gitdb/test/test_pack.py index 48a1852..4b01741 100644 --- a/gitdb/test/test_pack.py +++ b/gitdb/test/test_pack.py @@ -101,7 +101,7 @@ class TestPack(TestBase): dstream = DeltaApplyReader.new(streams) except ValueError: # ignore these, old git versions use only ref deltas, - # which we havent resolved ( as we are without an index ) + # which we haven't resolved ( as we are without an index ) # Also ignore non-delta streams continue # END get deltastream diff --git a/gitdb/util.py b/gitdb/util.py index c4cafec..f9f8c0e 100644 --- a/gitdb/util.py +++ b/gitdb/util.py @@ -182,7 +182,7 @@ def file_contents_ro(fd, stream=False, allow_mmap=True): pass # END exception handling - # read manully + # read manually contents = os.read(fd, os.fstat(fd).st_size) if stream: return _RandomAccessBytesIO(contents) @@ -248,7 +248,7 @@ class LazyMixin(object): def __getattr__(self, attr): """ Whenever an attribute is requested that we do not know, we allow it - to be created and set. Next time the same attribute is reqeusted, it is simply + to be created and set. Next time the same attribute is requested, it is simply returned from our dict/slots. """ self._set_cache_(attr) # will raise in case the cache was not created @@ -332,7 +332,7 @@ class LockedFD(object): # open actual file if required if self._fd is None: - # we could specify exlusive here, as we obtained the lock anyway + # we could specify exclusive here, as we obtained the lock anyway try: self._fd = os.open(self._filepath, os.O_RDONLY | binary) except: |