diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 4f986e2..879f59e 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -65,11 +65,11 @@ Coding style - For code, follow `PEP8 `_. - Use **double quotes**. - - Try to keep line length below **100 characters** (or 120 if absolutely nescessary). + - Try to keep line length below **100 characters** (or 120 if absolutely necessary). - Use `.format()` for string formatting. - For docs, please follow `PEP257 `_. -- **Importing modules** is okay for modules from standard library. If you want to include +- **Importing modules** is okay for modules from standard library. If you want to include a third-party module, please consult it on GitHub before. - `Please use regular expressions only as a last resort. `_ When possible, use string manipulations, such as :code:`split()` and then list operations. It is more readable. diff --git a/README.rst b/README.rst index f393bec..e053129 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ Features - **search** caches - normal search (unlimited number of caches from any point) - - quick search (all caches inside some area) - currently not working, see bellow + - quick search (all caches inside some area) - currently not working, see below - **get cache** and its details @@ -86,9 +86,9 @@ and ``password`` from that file as login credentials. You can also provide multiple username and password tuples in a file as login credentials. -The tuple to be used can be chosen by providing its username when calling pycaching.login(), -e.g. pycaching.login("myusername2"). The first username and password tuple specified will be -used as default if pycaching.login() is called without providing a username. +The tuple to be used can be chosen by providing its username when calling ``pycaching.login()``, +e.g. ``pycaching.login("myusername2")``. The first username and password tuple specified will be +used as default if ``pycaching.login()`` is called without providing a username. .. code-block:: json @@ -111,7 +111,7 @@ using the ``password_cmd`` key instead of ``password``. # sample .gc_credentials JSON file with password command { "username": "myusername", "password_cmd": "pass geocaching.com/myUsername" } -Note that the ``password`` and ``password_cmd`` keys are mutually exclusisive. +Note that the ``password`` and ``password_cmd`` keys are mutually exclusive. @@ -127,7 +127,7 @@ Load a cache details This uses lazy loading, so the `Cache `__ object is created immediately and the page is loaded when needed (accessing the name). -You can use different method of loading cache details. It will be much faster, but it will load less +You can use a different method of loading cache details. It will be much faster, but it will load less details: .. code-block:: python @@ -158,7 +158,7 @@ Post a log to cache geocaching.post_log("GC1PAR2", "Found cache in the rain. Nice place, TFTC!") -It is also possible to call post_log on `Cache +It is also possible to call ``post_log`` on `Cache `__ object, but you would have to create `Log `__ object manually and pass it to this method. diff --git a/docs/api.rst b/docs/api.rst index f013377..28dc9d9 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -2,7 +2,7 @@ API reference =============================================================================== -Here you can find an overview of all avaliable classes and methods. +Here you can find an overview of all available classes and methods. .. warning:: Deprecated methods will be removed in next minor version. diff --git a/pycaching/cache.py b/pycaching/cache.py index 197a741..7f59fee 100644 --- a/pycaching/cache.py +++ b/pycaching/cache.py @@ -112,7 +112,7 @@ class Cache(object): @classmethod def _from_print_page(cls, geocaching, guid, soup): - """Create a cache instance from a souped print-page and a GUID""" + """Create a cache instance from a souped print-page and a GUID.""" if soup.find("p", "Warning") is not None: raise errors.PMOnlyException() diff --git a/pycaching/geocaching.py b/pycaching/geocaching.py index 1af63e3..59e5ab0 100644 --- a/pycaching/geocaching.py +++ b/pycaching/geocaching.py @@ -225,7 +225,7 @@ def search(self, point, limit=float("inf")): Search for caches around some point by loading search pages and parsing the data from these pages. Yield :class:`.Cache` objects filled with data from search page. You can provide limit - as a convinient way to stop generator after certain number of caches. + as a convenient way to stop generator after certain number of caches. :param .geo.Point point: Search center point. :param int limit: Maximum number of caches to generate. @@ -241,7 +241,7 @@ def search(self, point, limit=float("inf")): # result is empty - no more caches return - # prepare language-dependant mappings + # prepare language-dependent mappings if start_index == 0: cache_sizes_filter_wrapper = whole_page.find("div", class_="cache-sizes-wrapper") localized_size_mapping = { @@ -406,7 +406,7 @@ def _cache_from_guid(self, guid): def _try_getting_cache_from_guid(self, guid): """Try to get a cache from guid page if possible, otherwise from gccode. - :param str guid: guid of the cache that should be read in + :param str guid: Guid of the cache that should be read in. """ try: return self.get_cache(guid=guid) diff --git a/pycaching/trackable.py b/pycaching/trackable.py index 68d1229..43a5e79 100644 --- a/pycaching/trackable.py +++ b/pycaching/trackable.py @@ -3,7 +3,7 @@ from pycaching import errors from pycaching.util import lazy_loaded, format_date -# prefix _type() function to avoid colisions with trackable type +# prefix _type() function to avoid collisions with trackable type _type = type @@ -204,7 +204,7 @@ def load(self): def _load_log_page(self): """Load a logging page for this trackable. - :return: Tuple of data nescessary to log the trackable. + :return: Tuple of data necessary to log the trackable. :rtype: :class:`tuple` of (:class:`set`:, :class:`dict`, class:`str`) """ if not self._log_page_url: