diff options
author | Hugo <hugovk@users.noreply.github.com> | 2019-10-19 13:56:34 +0300 |
---|---|---|
committer | Hugo <hugovk@users.noreply.github.com> | 2019-10-19 13:56:34 +0300 |
commit | debe77e4321f6514142566bd62cb76a2f868f0d2 (patch) | |
tree | 9083d4ff91c588aa85591fad2825e5ca9b41ce5c /src | |
parent | 0e022d89e5b27c60dd7a8f7f9746515c21483606 (diff) | |
download | tablib-debe77e4321f6514142566bd62cb76a2f868f0d2.tar.gz |
Fix typos
Diffstat (limited to 'src')
-rw-r--r-- | src/tablib/compat.py | 2 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy/dbf.py | 4 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy/dbfnew.py | 4 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy/fields.py | 16 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy/record.py | 8 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy/utils.py | 6 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy3/dbf.py | 4 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy3/dbfnew.py | 4 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy3/fields.py | 16 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy3/record.py | 8 | ||||
-rw-r--r-- | src/tablib/packages/dbfpy3/utils.py | 6 |
11 files changed, 39 insertions, 39 deletions
diff --git a/src/tablib/compat.py b/src/tablib/compat.py index 1582173..1956e99 100644 --- a/src/tablib/compat.py +++ b/src/tablib/compat.py @@ -4,7 +4,7 @@ tablib.compat ~~~~~~~~~~~~~ -Tablib compatiblity module. +Tablib compatibility module. """ diff --git a/src/tablib/packages/dbfpy/dbf.py b/src/tablib/packages/dbfpy/dbf.py index 8147d0e..fe0736f 100644 --- a/src/tablib/packages/dbfpy/dbf.py +++ b/src/tablib/packages/dbfpy/dbf.py @@ -122,7 +122,7 @@ class Dbf(object): # created or opened and truncated) self.stream = file(f, "w+b") else: - # tabe file must exist + # table file must exist self.stream = file(f, ("r+b", "rb")[bool(readOnly)]) else: # a stream @@ -187,7 +187,7 @@ class Dbf(object): raise IndexError("Record index out of range") return index - # iterface methods + # interface methods def close(self): self.flush() diff --git a/src/tablib/packages/dbfpy/dbfnew.py b/src/tablib/packages/dbfpy/dbfnew.py index 008d307..e9b6ce5 100644 --- a/src/tablib/packages/dbfpy/dbfnew.py +++ b/src/tablib/packages/dbfpy/dbfnew.py @@ -6,7 +6,7 @@ Note: this is a legacy interface. New code should use Dbf class TODO: - handle Memo fields. - - check length of the fields accoring to the + - check length of the fields according to the `http://www.clicketyclick.dk/databases/xbase/format/data_types.html` """ @@ -37,7 +37,7 @@ class _FieldDefinition(object): ``len``, ``dec`` and ``cls`` fields. Objects also implement get/setitem magic functions, so fields - could be accessed via sequence iterface, where 'name' has + could be accessed via sequence interface, where 'name' has index 0, 'type' index 1, 'len' index 2, 'dec' index 3 and 'cls' could be located at index 4. diff --git a/src/tablib/packages/dbfpy/fields.py b/src/tablib/packages/dbfpy/fields.py index 69cd436..a8f3d9b 100644 --- a/src/tablib/packages/dbfpy/fields.py +++ b/src/tablib/packages/dbfpy/fields.py @@ -42,14 +42,14 @@ class DbfFieldDef(object): """Abstract field definition. Child classes must override ``type`` class attribute to provide datatype - infromation of the field definition. For more info about types visit + information of the field definition. For more info about types visit `http://www.clicketyclick.dk/databases/xbase/format/data_types.html` Also child classes must override ``defaultValue`` field to provide default value for the field value. If child class has fixed length ``length`` class attribute must be - overriden and set to the valid value. None value means, that field + overridden and set to the valid value. None value means, that field isn't of fixed length. Note: ``name`` field must not be changed after instantiation. @@ -65,19 +65,19 @@ class DbfFieldDef(object): # field type. for more information about fields types visit # `http://www.clicketyclick.dk/databases/xbase/format/data_types.html` - # must be overriden in child classes + # must be overridden in child classes typeCode = None # default value for the field. this field must be - # overriden in child classes + # overridden in child classes defaultValue = None def __init__(self, name, length=None, decimalCount=None, start=None, stop=None, ignoreErrors=False, ): """Initialize instance.""" - assert self.typeCode is not None, "Type code must be overriden" - assert self.defaultValue is not None, "Default value must be overriden" + assert self.typeCode is not None, "Type code must be overridden" + assert self.defaultValue is not None, "Default value must be overridden" ## fix arguments if len(name) >10: raise ValueError("Field name \"%s\" is too long" % name) @@ -190,7 +190,7 @@ class DbfFieldDef(object): def encodeValue(self, value): """Return str object containing encoded field value. - This is an abstract method and it must be overriden in child classes. + This is an abstract method and it must be overridden in child classes. """ raise NotImplementedError @@ -328,7 +328,7 @@ class DbfLogicalFieldDef(DbfFieldDef): class DbfMemoFieldDef(DbfFieldDef): """Definition of the memo field. - Note: memos aren't currenly completely supported. + Note: memos aren't currently completely supported. """ diff --git a/src/tablib/packages/dbfpy/record.py b/src/tablib/packages/dbfpy/record.py index 97bbfb3..f6d2e0d 100644 --- a/src/tablib/packages/dbfpy/record.py +++ b/src/tablib/packages/dbfpy/record.py @@ -23,12 +23,12 @@ import utils class DbfRecord(object): """DBF record. - Instances of this class shouldn't be created manualy, + Instances of this class shouldn't be created manually, use `dbf.Dbf.newRecord` instead. Class implements mapping/sequence interface, so fields could be accessed via their names or indexes - (names is a preffered way to access fields). + (names is a preferred way to access fields). Hint: Use `store` method to save modified record. @@ -55,7 +55,7 @@ class DbfRecord(object): ## creation and initialization def __init__(self, dbf, index=None, deleted=False, data=None): - """Instance initialiation. + """Instance initialization. Arguments: dbf: @@ -162,7 +162,7 @@ class DbfRecord(object): Note: This isn't a public method, it's better to - use 'store' instead publically. + use 'store' instead publicly. Be design ``_write`` method should be called only from the `Dbf` instance. diff --git a/src/tablib/packages/dbfpy/utils.py b/src/tablib/packages/dbfpy/utils.py index cef8aa5..1748ade 100644 --- a/src/tablib/packages/dbfpy/utils.py +++ b/src/tablib/packages/dbfpy/utils.py @@ -20,7 +20,7 @@ import time def unzfill(str): """Return a string without ASCII NULs. - This function searchers for the first NUL (ASCII 0) occurance + This function searchers for the first NUL (ASCII 0) occurrence and truncates string till that position. """ @@ -48,7 +48,7 @@ def getDate(date=None): sequence: assuming (year, month, day, ...) sequence; - Additionaly, if ``date`` has callable ``ticks`` attribute, + Additionally, if ``date`` has callable ``ticks`` attribute, it will be used and result of the called would be treated as a timestamp value. @@ -95,7 +95,7 @@ def getDateTime(value=None): sequence: assuming (year, month, day, ...) sequence; - Additionaly, if ``value`` has callable ``ticks`` attribute, + Additionally, if ``value`` has callable ``ticks`` attribute, it will be used and result of the called would be treated as a timestamp value. diff --git a/src/tablib/packages/dbfpy3/dbf.py b/src/tablib/packages/dbfpy3/dbf.py index 218353e..48580d0 100644 --- a/src/tablib/packages/dbfpy3/dbf.py +++ b/src/tablib/packages/dbfpy3/dbf.py @@ -121,7 +121,7 @@ class Dbf(object): # created or opened and truncated) self.stream = open(f, "w+b") else: - # tabe file must exist + # table file must exist self.stream = open(f, ("r+b", "rb")[bool(readOnly)]) else: # a stream @@ -186,7 +186,7 @@ class Dbf(object): raise IndexError("Record index out of range") return index - # iterface methods + # interface methods def close(self): self.flush() diff --git a/src/tablib/packages/dbfpy3/dbfnew.py b/src/tablib/packages/dbfpy3/dbfnew.py index 8fab275..28c54ef 100644 --- a/src/tablib/packages/dbfpy3/dbfnew.py +++ b/src/tablib/packages/dbfpy3/dbfnew.py @@ -6,7 +6,7 @@ Note: this is a legacy interface. New code should use Dbf class TODO: - handle Memo fields. - - check length of the fields accoring to the + - check length of the fields according to the `http://www.clicketyclick.dk/databases/xbase/format/data_types.html` """ @@ -37,7 +37,7 @@ class _FieldDefinition(object): ``len``, ``dec`` and ``cls`` fields. Objects also implement get/setitem magic functions, so fields - could be accessed via sequence iterface, where 'name' has + could be accessed via sequence interface, where 'name' has index 0, 'type' index 1, 'len' index 2, 'dec' index 3 and 'cls' could be located at index 4. diff --git a/src/tablib/packages/dbfpy3/fields.py b/src/tablib/packages/dbfpy3/fields.py index 87916fe..ad63c28 100644 --- a/src/tablib/packages/dbfpy3/fields.py +++ b/src/tablib/packages/dbfpy3/fields.py @@ -42,14 +42,14 @@ class DbfFieldDef(object): """Abstract field definition. Child classes must override ``type`` class attribute to provide datatype - infromation of the field definition. For more info about types visit + information of the field definition. For more info about types visit `http://www.clicketyclick.dk/databases/xbase/format/data_types.html` Also child classes must override ``defaultValue`` field to provide default value for the field value. If child class has fixed length ``length`` class attribute must be - overriden and set to the valid value. None value means, that field + overridden and set to the valid value. None value means, that field isn't of fixed length. Note: ``name`` field must not be changed after instantiation. @@ -65,19 +65,19 @@ class DbfFieldDef(object): # field type. for more information about fields types visit # `http://www.clicketyclick.dk/databases/xbase/format/data_types.html` - # must be overriden in child classes + # must be overridden in child classes typeCode = None # default value for the field. this field must be - # overriden in child classes + # overridden in child classes defaultValue = None def __init__(self, name, length=None, decimalCount=None, start=None, stop=None, ignoreErrors=False, ): """Initialize instance.""" - assert self.typeCode is not None, "Type code must be overriden" - assert self.defaultValue is not None, "Default value must be overriden" + assert self.typeCode is not None, "Type code must be overridden" + assert self.defaultValue is not None, "Default value must be overridden" ## fix arguments if len(name) >10: raise ValueError("Field name \"%s\" is too long" % name) @@ -190,7 +190,7 @@ class DbfFieldDef(object): def encodeValue(self, value): """Return str object containing encoded field value. - This is an abstract method and it must be overriden in child classes. + This is an abstract method and it must be overridden in child classes. """ raise NotImplementedError @@ -328,7 +328,7 @@ class DbfLogicalFieldDef(DbfFieldDef): class DbfMemoFieldDef(DbfFieldDef): """Definition of the memo field. - Note: memos aren't currenly completely supported. + Note: memos aren't currently completely supported. """ diff --git a/src/tablib/packages/dbfpy3/record.py b/src/tablib/packages/dbfpy3/record.py index d301476..c939788 100644 --- a/src/tablib/packages/dbfpy3/record.py +++ b/src/tablib/packages/dbfpy3/record.py @@ -23,12 +23,12 @@ from . import utils class DbfRecord(object): """DBF record. - Instances of this class shouldn't be created manualy, + Instances of this class shouldn't be created manually, use `dbf.Dbf.newRecord` instead. Class implements mapping/sequence interface, so fields could be accessed via their names or indexes - (names is a preffered way to access fields). + (names is a preferred way to access fields). Hint: Use `store` method to save modified record. @@ -55,7 +55,7 @@ class DbfRecord(object): ## creation and initialization def __init__(self, dbf, index=None, deleted=False, data=None): - """Instance initialiation. + """Instance initialization. Arguments: dbf: @@ -162,7 +162,7 @@ class DbfRecord(object): Note: This isn't a public method, it's better to - use 'store' instead publically. + use 'store' instead publicly. Be design ``_write`` method should be called only from the `Dbf` instance. diff --git a/src/tablib/packages/dbfpy3/utils.py b/src/tablib/packages/dbfpy3/utils.py index 856ade8..ac63e32 100644 --- a/src/tablib/packages/dbfpy3/utils.py +++ b/src/tablib/packages/dbfpy3/utils.py @@ -20,7 +20,7 @@ import time def unzfill(str): """Return a string without ASCII NULs. - This function searchers for the first NUL (ASCII 0) occurance + This function searchers for the first NUL (ASCII 0) occurrence and truncates string till that position. """ @@ -48,7 +48,7 @@ def getDate(date=None): sequence: assuming (year, month, day, ...) sequence; - Additionaly, if ``date`` has callable ``ticks`` attribute, + Additionally, if ``date`` has callable ``ticks`` attribute, it will be used and result of the called would be treated as a timestamp value. @@ -95,7 +95,7 @@ def getDateTime(value=None): sequence: assuming (year, month, day, ...) sequence; - Additionaly, if ``value`` has callable ``ticks`` attribute, + Additionally, if ``value`` has callable ``ticks`` attribute, it will be used and result of the called would be treated as a timestamp value. |