From f285ccb45a3769b28aff0282b84475b93a153cf7 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Tue, 17 Sep 2024 00:49:50 +0800 Subject: [PATCH] Fix typos (#1448) Found via `typos --hidden --format brief` --- CHANGES.txt | 4 ++-- appveyor.yml | 2 +- docs/cli.rst | 2 +- docs/conf.py | 2 +- fiona/__init__.py | 2 +- fiona/_path.py | 4 ++-- fiona/_vsiopener.pyx | 4 ++-- fiona/drvsupport.py | 2 +- fiona/env.py | 2 +- fiona/fio/collect.py | 4 ++-- fiona/fio/dump.py | 4 ++-- fiona/inspector.py | 2 +- fiona/logutils.py | 2 +- fiona/meta.py | 4 ++-- fiona/session.py | 4 ++-- fiona/vfs.py | 4 ++-- tests/test_bigint.py | 2 +- tests/test_datetime.py | 2 +- 18 files changed, 26 insertions(+), 26 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e9b7ffd81..3dbd138c4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -290,7 +290,7 @@ Deprecations: Changes: - Fiona's FionaDeprecationWarning now sub-classes DeprecationWarning. -- Some test modules have beeen re-formatted using black. +- Some test modules have been re-formatted using black. New features: @@ -1017,7 +1017,7 @@ can't unhear Love Coffin. - New BytesCollection class (#215). - Add GDAL's OpenFileGDB driver to registered drivers (#221). - Implement CLI commands as plugins (#228). -- Raise click.abort instead of calling sys.exit, preventing suprising exits +- Raise click.abort instead of calling sys.exit, preventing surprising exits (#236). 1.5.1 (2015-03-19) diff --git a/appveyor.yml b/appveyor.yml index 3ca9db410..2ed578d01 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ environment: global: # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script intepreter + # /E:ON and /V:ON options are not enabled in the batch script interpreter # See: http://stackoverflow.com/a/13751649/163740 CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd" GDAL_HOME: "C:\\gdal" diff --git a/docs/cli.rst b/docs/cli.rst index b9c4b48b7..a056c2aa6 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -232,7 +232,7 @@ dataset using another format. > | fio load /tmp/test.shp --driver Shapefile This command also supports GeoJSON text sequences. RS-separated sequences will -be detected. If you want to load LF-separated sequences, you must specfiy +be detected. If you want to load LF-separated sequences, you must specify ``--x-json-seq``. .. code-block:: console diff --git a/docs/conf.py b/docs/conf.py index 18c2d7fa2..ca14f169f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -285,7 +285,7 @@ # The format is a list of tuples containing the path and title. #epub_pre_files = [] -# HTML files shat should be inserted after the pages created by sphinx. +# HTML files that should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_post_files = [] diff --git a/fiona/__init__.py b/fiona/__init__.py index afa441b83..297119279 100644 --- a/fiona/__init__.py +++ b/fiona/__init__.py @@ -155,7 +155,7 @@ def open( 'example.shp', enabled_drivers=['GeoJSON', 'ESRI Shapefile']) Some format drivers permit low-level filtering of fields. Specific - fields can be ommitted by using the ``ignore_fields`` parameter. + fields can be omitted by using the ``ignore_fields`` parameter. Specific fields can be selected, excluding all others, by using the ``include_fields`` parameter. diff --git a/fiona/_path.py b/fiona/_path.py index f25842f93..24dbf860f 100644 --- a/fiona/_path.py +++ b/fiona/_path.py @@ -16,7 +16,7 @@ from fiona.errors import PathError # Supported URI schemes and their mapping to GDAL's VSI suffix. -# TODO: extend for other cloud plaforms. +# TODO: extend for other cloud platforms. SCHEMES = { 'ftp': 'curl', 'gzip': 'gzip', @@ -34,7 +34,7 @@ ARCHIVESCHEMES = set CURLSCHEMES = set([k for k, v in SCHEMES.items() if v == 'curl']) -# TODO: extend for other cloud plaforms. +# TODO: extend for other cloud platforms. REMOTESCHEMES = set([k for k, v in SCHEMES.items() if v in ('curl', 's3', 'oss', 'gs', 'az',)]) diff --git a/fiona/_vsiopener.pyx b/fiona/_vsiopener.pyx index dcfff8a6b..355139bc5 100644 --- a/fiona/_vsiopener.pyx +++ b/fiona/_vsiopener.pyx @@ -28,7 +28,7 @@ cdef str VSI_NS_ROOT = "vsifiopener" # the plugin to determine what "files" exist on "disk". # Currently the only way to "create" a file in the filesystem is to add # an entry to this dictionary. GDAL will then Open the path later. -_OPENER_REGISTRY = ContextVar("opener_registery") +_OPENER_REGISTRY = ContextVar("opener_registry") _OPENER_REGISTRY.set({}) _OPEN_FILE_EXIT_STACKS = ContextVar("open_file_exit_stacks") _OPEN_FILE_EXIT_STACKS.set({}) @@ -188,7 +188,7 @@ cdef void* pyopener_open( This function is mandatory in the GDAL Filesystem Plugin API. GDAL may call this function multiple times per filename and each - result must be seperately seekable. + result must be separately seekable. """ cdef FSData *fsdata = pUserData path = fsdata.path.decode("utf-8") diff --git a/fiona/drvsupport.py b/fiona/drvsupport.py index 662f2ee44..e4790558a 100644 --- a/fiona/drvsupport.py +++ b/fiona/drvsupport.py @@ -221,7 +221,7 @@ def vector_driver_extensions(): extension_to_driver = {} for drv, modes in supported_drivers.items(): - # update extensions based on driver suppport + # update extensions based on driver support for extension in extensions(drv) or (): if "w" in modes: extension_to_driver[extension] = extension_to_driver.get(extension, drv) diff --git a/fiona/env.py b/fiona/env.py index f40f25258..47c5e63df 100644 --- a/fiona/env.py +++ b/fiona/env.py @@ -540,7 +540,7 @@ def require_gdal_version( def some_func(): calling `some_func` with a runtime version of GDAL that is < 2.2 raises a - GDALVersionErorr. + GDALVersionError. \b @require_gdal_version('2.2', param='foo') diff --git a/fiona/fio/collect.py b/fiona/fio/collect.py index 9fbd07095..5d61211d1 100644 --- a/fiona/fio/collect.py +++ b/fiona/fio/collect.py @@ -186,7 +186,7 @@ def feature_text_gen(): # Log error and close up the GeoJSON, leaving it # more or less valid no matter what happens above. logger.critical( - "failed to serialize file record %d (%s), " "quiting", i, exc + "failed to serialize file record %d (%s), " "quitting", i, exc ) sink.write("]") sink.write(tail) @@ -214,7 +214,7 @@ def feature_text_gen(): ) else: logger.critical( - "failed to serialize file record %d (%s), " "quiting", + "failed to serialize file record %d (%s), " "quitting", i, exc, ) diff --git a/fiona/fio/dump.py b/fiona/fio/dump.py index 9cbcca175..6b38a4e0b 100644 --- a/fiona/fio/dump.py +++ b/fiona/fio/dump.py @@ -132,7 +132,7 @@ def transformer(crs, feat): # Log error and close up the GeoJSON, leaving it # more or less valid no matter what happens above. logger.critical( - "failed to serialize file record %d (%s), " "quiting", i, exc + "failed to serialize file record %d (%s), " "quitting", i, exc ) sink.write("]") sink.write(tail) @@ -165,7 +165,7 @@ def transformer(crs, feat): else: logger.critical( "failed to serialize file record %d (%s), " - "quiting", + "quitting", i, exc) sink.write("]") sink.write(tail) diff --git a/fiona/inspector.py b/fiona/inspector.py index a84d23077..9174fa185 100644 --- a/fiona/inspector.py +++ b/fiona/inspector.py @@ -10,7 +10,7 @@ def main(srcfile): - """Open a dataset in an iteractive session.""" + """Open a dataset in an interactive session.""" with fiona.drivers(): with fiona.open(srcfile) as src: code.interact( diff --git a/fiona/logutils.py b/fiona/logutils.py index 43e143523..081e1c142 100644 --- a/fiona/logutils.py +++ b/fiona/logutils.py @@ -4,7 +4,7 @@ class FieldSkipLogFilter(logging.Filter): - """Filter field skip log messges. + """Filter field skip log messages. At most, one message per field skipped per loop will be passed. """ diff --git a/fiona/meta.py b/fiona/meta.py index d632123cf..7c0e2a561 100644 --- a/fiona/meta.py +++ b/fiona/meta.py @@ -223,8 +223,8 @@ def supports_vsi(driver): bool """ - virutal_io = _get_metadata_item(driver, MetadataItem.VIRTUAL_IO) - return virutal_io is not None and virutal_io.upper() == "YES" + virtual_io = _get_metadata_item(driver, MetadataItem.VIRTUAL_IO) + return virtual_io is not None and virtual_io.upper() == "YES" @require_gdal_version('2.0') diff --git a/fiona/session.py b/fiona/session.py index 9d3571d73..5e169976a 100644 --- a/fiona/session.py +++ b/fiona/session.py @@ -275,7 +275,7 @@ def __init__( profile_name : str, optional A shared credentials profile name, as per boto3. endpoint_url: str, optional - An endpoint_url, as per GDAL's AWS_S3_ENPOINT + An endpoint_url, as per GDAL's AWS_S3_ENDPOINT requester_pays : bool, optional True if the requester agrees to pay transfer costs (default: False) @@ -359,7 +359,7 @@ class GSSession(Session): """Configures access to secured resources stored in Google Cloud Storage """ def __init__(self, google_application_credentials=None): - """Create new Google Cloude Storage session + """Create new Google Cloud Storage session Parameters ---------- diff --git a/fiona/vfs.py b/fiona/vfs.py index 44255c585..96c07421c 100644 --- a/fiona/vfs.py +++ b/fiona/vfs.py @@ -6,7 +6,7 @@ # Supported URI schemes and their mapping to GDAL's VSI suffix. -# TODO: extend for other cloud plaforms. +# TODO: extend for other cloud platforms. SCHEMES = { 'ftp': 'curl', 'gzip': 'gzip', @@ -20,7 +20,7 @@ CURLSCHEMES = {k for k, v in SCHEMES.items() if v == 'curl'} -# TODO: extend for other cloud plaforms. +# TODO: extend for other cloud platforms. REMOTESCHEMES = {k for k, v in SCHEMES.items() if v in ('curl', 's3', 'gs')} diff --git a/tests/test_bigint.py b/tests/test_bigint.py index 799266358..4f9877312 100644 --- a/tests/test_bigint.py +++ b/tests/test_bigint.py @@ -5,7 +5,7 @@ integer that require 10 or 11 characters. the field is dynamically extended like managed since a few versions). OFTInteger64 fields are created by default with a width of 18 digits, so to be unambiguously read as OFTInteger64, and -extented to 19 or 20 if needed. Integer fields of width between 10 and 18 +extended to 19 or 20 if needed. Integer fields of width between 10 and 18 will be read as OFTInteger64. Above they will be treated as OFTReal. In previous GDAL versions, Integer fields were created with a default with of 10, and thus will be now read as OFTInteger64. An open option, DETECT_TYPE=YES, can diff --git a/tests/test_datetime.py b/tests/test_datetime.py index 7f29f6274..0392202ed 100644 --- a/tests/test_datetime.py +++ b/tests/test_datetime.py @@ -740,7 +740,7 @@ def test_datetime_field_type_marked_not_supported_is_not_supported( ): """Test if a date/datetime/time field type marked as not not supported is really not supported - Warning: Success of this test does not necessary mean that a field is not supported. E.g. errors can occour due to + Warning: Success of this test does not necessary mean that a field is not supported. E.g. errors can occur due to special schema requirements of drivers. This test only covers the standard case. """