Skip to content

Commit 79af9f9

Browse files
Merge pull request #127 from FriedrichFroebel/typoFixes
Fix some typos and add some code formatting
2 parents 8ff9377 + 9e1a921 commit 79af9f9

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ Coding style
6565
- For code, follow `PEP8 <https://www.python.org/dev/peps/pep-0008/>`_.
6666

6767
- Use **double quotes**.
68-
- Try to keep line length below **100 characters** (or 120 if absolutely nescessary).
68+
- Try to keep line length below **100 characters** (or 120 if absolutely necessary).
6969
- Use `.format()` for string formatting.
7070

7171
- For docs, please follow `PEP257 <https://www.python.org/dev/peps/pep-0257/>`_.
72-
- **Importing modules** is okay for modules from standard library. If you want to include
72+
- **Importing modules** is okay for modules from standard library. If you want to include a
7373
third-party module, please consult it on GitHub before.
7474
- `Please use regular expressions only as a last resort. <http://imgur.com/j3G9xyP>`_ When possible, use string manipulations,
7575
such as :code:`split()` and then list operations. It is more readable.

README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Features
1313
- **search** caches
1414

1515
- normal search (unlimited number of caches from any point)
16-
- quick search (all caches inside some area) - currently not working, see bellow
16+
- quick search (all caches inside some area) - currently not working, see below
1717

1818
- **get cache** and its details
1919

@@ -86,9 +86,9 @@ and ``password`` from that file as login credentials.
8686
8787
8888
You can also provide multiple username and password tuples in a file as login credentials.
89-
The tuple to be used can be chosen by providing its username when calling pycaching.login(),
90-
e.g. pycaching.login("myusername2"). The first username and password tuple specified will be
91-
used as default if pycaching.login() is called without providing a username.
89+
The tuple to be used can be chosen by providing its username when calling ``pycaching.login()``,
90+
e.g. ``pycaching.login("myusername2")``. The first username and password tuple specified will be
91+
used as default if ``pycaching.login()`` is called without providing a username.
9292

9393
.. code-block:: json
9494
@@ -111,7 +111,7 @@ using the ``password_cmd`` key instead of ``password``.
111111
# sample .gc_credentials JSON file with password command
112112
{ "username": "myusername", "password_cmd": "pass geocaching.com/myUsername" }
113113
114-
Note that the ``password`` and ``password_cmd`` keys are mutually exclusisive.
114+
Note that the ``password`` and ``password_cmd`` keys are mutually exclusive.
115115

116116

117117

@@ -127,7 +127,7 @@ Load a cache details
127127
This uses lazy loading, so the `Cache <https://pycaching.readthedocs.io/en/latest/api.html#cache>`__
128128
object is created immediately and the page is loaded when needed (accessing the name).
129129

130-
You can use different method of loading cache details. It will be much faster, but it will load less
130+
You can use a different method of loading cache details. It will be much faster, but it will load less
131131
details:
132132

133133
.. code-block:: python
@@ -158,7 +158,7 @@ Post a log to cache
158158
159159
geocaching.post_log("GC1PAR2", "Found cache in the rain. Nice place, TFTC!")
160160
161-
It is also possible to call post_log on `Cache
161+
It is also possible to call ``post_log`` on `Cache
162162
<https://pycaching.readthedocs.io/en/latest/api.html#cache>`__ object, but you would have to create
163163
`Log <https://pycaching.readthedocs.io/en/latest/api.html#log>`__ object manually and pass it to
164164
this method.

docs/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
API reference
33
===============================================================================
44

5-
Here you can find an overview of all avaliable classes and methods.
5+
Here you can find an overview of all available classes and methods.
66

77
.. warning::
88
Deprecated methods will be removed in next minor version.

pycaching/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Cache(object):
112112

113113
@classmethod
114114
def _from_print_page(cls, geocaching, guid, soup):
115-
"""Create a cache instance from a souped print-page and a GUID"""
115+
"""Create a cache instance from a souped print-page and a GUID."""
116116
if soup.find("p", "Warning") is not None:
117117
raise errors.PMOnlyException()
118118

pycaching/geocaching.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def search(self, point, limit=float("inf")):
225225
226226
Search for caches around some point by loading search pages and parsing the data from these
227227
pages. Yield :class:`.Cache` objects filled with data from search page. You can provide limit
228-
as a convinient way to stop generator after certain number of caches.
228+
as a convenient way to stop generator after certain number of caches.
229229
230230
:param .geo.Point point: Search center point.
231231
:param int limit: Maximum number of caches to generate.
@@ -241,7 +241,7 @@ def search(self, point, limit=float("inf")):
241241
# result is empty - no more caches
242242
return
243243

244-
# prepare language-dependant mappings
244+
# prepare language-dependent mappings
245245
if start_index == 0:
246246
cache_sizes_filter_wrapper = whole_page.find("div", class_="cache-sizes-wrapper")
247247
localized_size_mapping = {
@@ -406,7 +406,7 @@ def _cache_from_guid(self, guid):
406406
def _try_getting_cache_from_guid(self, guid):
407407
"""Try to get a cache from guid page if possible, otherwise from gccode.
408408
409-
:param str guid: guid of the cache that should be read in
409+
:param str guid: Guid of the cache that should be read in.
410410
"""
411411
try:
412412
return self.get_cache(guid=guid)

pycaching/trackable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pycaching import errors
44
from pycaching.util import lazy_loaded, format_date
55

6-
# prefix _type() function to avoid colisions with trackable type
6+
# prefix _type() function to avoid collisions with trackable type
77
_type = type
88

99

@@ -204,7 +204,7 @@ def load(self):
204204
def _load_log_page(self):
205205
"""Load a logging page for this trackable.
206206
207-
:return: Tuple of data nescessary to log the trackable.
207+
:return: Tuple of data necessary to log the trackable.
208208
:rtype: :class:`tuple` of (:class:`set`:, :class:`dict`, class:`str`)
209209
"""
210210
if not self._log_page_url:

0 commit comments

Comments
 (0)