Skip to content

Commit

Permalink
Documentation: Improve wording and fix typos
Browse files Browse the repository at this point in the history
Co-authored-by: Niklas Schmidtmer <[email protected]>
  • Loading branch information
amotl and hammerhead committed Dec 9, 2022
1 parent 889f7db commit 1a47d91
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/by-example/cursor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ up the response for subsequent cursor operations.
>>> connection = connect(client=ClientMocked())
>>> cursor = connection.cursor()

The rowcount and duration attribute is ``-1``, in case no ``execute()`` has
The ``rowcount`` and ``duration`` attributes are ``-1``, in case no ``execute()`` has
been performed on the cursor yet.

>>> cursor.rowcount
Expand Down
4 changes: 2 additions & 2 deletions docs/by-example/http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HTTP client
Introduction
============

The CrateDB Python driver package offers a HTTP client API object.
The CrateDB Python driver package offers an HTTP client API object.

>>> from crate.client import http
>>> HttpClient = http.Client
Expand Down Expand Up @@ -124,7 +124,7 @@ Trying to get a non-existing blob throws an exception::
...
crate.client.exceptions.DigestNotFoundException: myfiles/041f06fd774092478d450774f5ba30c5da78acc8

Creating a new blob - this method returns True if the blob was newly created::
Creating a new blob - this method returns ``True`` if the blob was newly created::

>>> from tempfile import TemporaryFile
>>> f = TemporaryFile()
Expand Down
6 changes: 3 additions & 3 deletions docs/by-example/sqlalchemy/cru.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Date should have been set at the insert due to default value via Python method:
>>> (now - location.datetime_tz).seconds < 4
True

Verify the return type of date and datetime:
Verify the return type of ``date`` and ``datetime``:

>>> type(location.date)
<class 'datetime.date'>
Expand All @@ -148,7 +148,7 @@ Verify the return type of date and datetime:
>>> type(location.datetime_notz)
<class 'datetime.datetime'>

The location also has a date and datetime property which both are nullable and
The location also has a ``date`` and ``datetime`` property which both are nullable and
aren't set when the row is inserted as there is no default method:

>>> location.nullable_datetime is None
Expand Down Expand Up @@ -226,7 +226,7 @@ Refresh "locations" table:

>>> _ = connection.execute("REFRESH TABLE locations")

Verify that objects can be used within lists, too:
Objects can be used within lists, too:

>>> location = session.query(Location).filter_by(name='Folfanga').one()
>>> location.details = [{'size': 'huge'}, {'clima': 'cold'}]
Expand Down
2 changes: 1 addition & 1 deletion docs/by-example/sqlalchemy/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Geospatial Types
================

Geospatial types, such as ``geo_point`` and ``geo_area`` can also be used as
part of a sqlalchemy schema:
part of an SQLAlchemy schema:

>>> from crate.client.sqlalchemy.types import Geopoint, Geoshape

Expand Down
4 changes: 2 additions & 2 deletions docs/by-example/sqlalchemy/inspection-reflection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ the database server version and default schema name can be inquired.
>>> dialect.server_version_info >= (1, 0, 0)
True

Check if schema exists:
Check if a schema exists:

>>> dialect.has_schema(connection, 'doc')
True

Check if table exists:
Check if a table exists:

>>> dialect.has_table(connection, 'locations')
True
Expand Down

0 comments on commit 1a47d91

Please sign in to comment.