Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

Commit

Permalink
Tweak docstrings in config module
Browse files Browse the repository at this point in the history
  • Loading branch information
wylee committed May 23, 2020
1 parent b570a48 commit c83f75f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/pyramid_restler/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ def run():

@contextmanager
def add_resources(self: Configurator, path_prefix, **shared_kwargs):
"""Add resources at path prefix.
"""Add multiple resources at the specified path prefix.
Example::
with config.add_resources("/api") as add_resource:
add_resource(".resources.SomeResource")
add_resource(".resources.SomeOtherResource")
add_resource(".resources.SomeResource") # -> /api/some
add_resource(".resources.SomeOtherResource") # -> /api/some-other
"""

Expand All @@ -237,10 +237,12 @@ def add(resource_factory, **kwargs):


def enable_cors(self: Configurator):
"""Enable CORS permissively.
"""Enable CORS permissively (for use in development).
This is allows CORS requests from *anywhere*, which is probably not
what you want. Use with caution.
This allows CORS requests from *anywhere*, which is probably not
what you want, other than in development.
.. warning:: Use with CAUTION.
"""
self.add_subscriber(add_cors_headers, NewResponse)
Expand Down

0 comments on commit c83f75f

Please sign in to comment.