Skip to content

Commit d8ba1ad

Browse files
artkayjonathan343
andauthored
Fix a number of typos (#2148)
* Fix a number of typos * Update local.py * Fix line too long linting error --------- Co-authored-by: jonathan343 <43360731+jonathan343@users.noreply.github.com>
1 parent 1537dcc commit d8ba1ad

23 files changed

Lines changed: 46 additions & 46 deletions

chalice/api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Control plane APIs for programatically building/deploying Chalice apps.
1+
"""Control plane APIs for programmatically building/deploying Chalice apps.
22
33
The eventual goal is to expose this as a public API that other tools can use
44
in their own integrations with Chalice, but this will need time for the APIs

chalice/cli/factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def load_chalice_app(
286286
validate_feature_flags: Optional[bool] = True,
287287
) -> Chalice:
288288
# validate_features indicates that we should validate that
289-
# any expiremental features used have the appropriate feature flags.
289+
# any experimental features used have the appropriate feature flags.
290290
if self.project_dir not in sys.path:
291291
sys.path.insert(0, self.project_dir)
292292
# The vendor directory has its contents copied up to the top level of

chalice/compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def raise_compile_error(*args, **kwargs): # type: ignore
8080
)
8181

8282
# On windows the C compiling story is much more complex than on posix as
83-
# there are many different C compilers that setuptools and disutils will
83+
# there are many different C compilers that setuptools and distutils will
8484
# try and find using a combination of known filepaths, registry entries,
8585
# and environment variables. Since there is no simple environment variable
8686
# we can replace when starting the subprocess that builds the package;
@@ -108,7 +108,7 @@ def raise_compile_error(*args, **kwargs): # type: ignore
108108
# inject _SETUPTOOLS_SHIM rather than the usual SETUPTOOLS_SHIM in pip.
109109
# This lets us apply our patches in the same process that will compile
110110
# the c extensions before the setup.py file has been executed.
111-
# The actual patches used are decribed in the comment above
111+
# The actual patches used are described in the comment above
112112
# _SETUPTOOLS_SHIM.
113113
pip_no_compile_c_shim = (
114114
'import pip;'

chalice/deploy/packager.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def deployment_package_filename(
121121
# based on a hash of the requirements file.
122122
# This is done so that we only "pip install -r requirements.txt"
123123
# when we know there's new dependencies we need to install.
124-
# The python version these depedencies were downloaded for is appended
124+
# The python version these dependencies were downloaded for is appended
125125
# to the end of the filename since the the dependencies may not change
126126
# but if the python version changes then the dependencies need to be
127127
# re-downloaded since they will not be compatible.
@@ -616,8 +616,8 @@ def _has_at_least_one_package(self, filename: str) -> bool:
616616
def _download_all_dependencies(
617617
self, requirements_filename: str, directory: str
618618
) -> Set[Package]:
619-
# Download dependencies prefering wheel files but falling back to
620-
# raw source dependences to get the transitive closure over
619+
# Download dependencies preferring wheel files but falling back to
620+
# raw source dependencies to get the transitive closure over
621621
# the dependency graph. Return the set of all package objects
622622
# which will serve as the master list of dependencies needed to deploy
623623
# successfully.
@@ -713,7 +713,7 @@ def _download_dependencies(
713713
# - lambda incompatible wheel files
714714
# Pip will give us a wheel when it can, but some distributions do not
715715
# ship with wheels at all in which case we will have an sdist for it.
716-
# In some cases a platform specific wheel file may be availble so pip
716+
# In some cases a platform specific wheel file may be available so pip
717717
# will have downloaded that, if our platform does not match the
718718
# platform lambda runs on (linux_x86_64/manylinux) then the downloaded
719719
# wheel file may not be compatible with lambda. Pure python wheels
@@ -1130,8 +1130,8 @@ def download_all_dependencies(
11301130
# When downloading all dependencies we expect to get an rc of 0 back
11311131
# since we are casting a wide net here letting pip have options about
11321132
# what to download. If a package is not found it is likely because it
1133-
# does not exist and was mispelled. In this case we raise an error with
1134-
# the package name. Otherwise a nonzero rc results in a generic
1133+
# does not exist and was misspelled. In this case we raise an error
1134+
# with the package name. Otherwise a nonzero rc results in a generic
11351135
# download error where we pass along the stderr.
11361136
if rc != 0:
11371137
if err is None:

chalice/deploy/planner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ def __eq__(self, other):
14481448

14491449

14501450
class PlanEncoder(json.JSONEncoder):
1451-
# pylint false positive overriden below
1451+
# pylint false positive overridden below
14521452
# https://github.com/PyCQA/pylint/issues/414
14531453
def default(self, o): # pylint: disable=E0202
14541454
# type: (Any) -> Any

chalice/deploy/swagger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def _generate_route_method(self, view):
154154
if view.api_key_required:
155155
# When this happens we also have to add the relevant portions
156156
# to the security definitions. We have to someone indicate
157-
# this because this neeeds to be added to the global config
157+
# this because this needs to be added to the global config
158158
# file.
159159
current.setdefault('security', []).append({'api_key': []})
160160
if view.authorizer:

chalice/local.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ def __init__(self, target_arn: str) -> None:
9494
self._arn = target_arn
9595

9696
def _resource_match(self, resource: str) -> bool:
97-
# Arn matching supports two special case characetrs that are not
97+
# Arn matching supports two special case characters that are not
9898
# escapable. * represents a glob which translates to a non-greedy
9999
# match of any number of characters. ? which is any single character.
100-
# These are easy to translate to a regex using .*? and . respectivly.
100+
# These are easy to translate to a regex using .*? and . respectively.
101101
escaped_resource = re.escape(resource)
102102
resource_regex = escaped_resource.replace(r'\?', '.').replace(
103103
r'\*', '.*?')
@@ -279,7 +279,7 @@ def __init__(self, function_name: str, memory_size: int,
279279
# documentation:
280280
# Information about the client application and device when invoked
281281
# through the AWS Mobile SDK, it can be null.
282-
# Chalice local doens't need to set these since they are specifically
282+
# Chalice local doesn't need to set these since they are specifically
283283
# for the mobile SDK.
284284
self.identity = None
285285
self.client_context = None
@@ -330,7 +330,7 @@ def authorize(self,
330330
# users to test their code local with a different cognito
331331
# authorization flow.
332332
warnings.warn(
333-
'%s for machine-to-machine communicaiton is not '
333+
'%s for machine-to-machine communication is not '
334334
'supported in local mode. All requests made against '
335335
'a route will be authorized to allow local testing.'
336336
% authorizer.__class__.__name__
@@ -680,7 +680,7 @@ class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
680680
for reuse. In the single threaded model this causes Chalice local to become
681681
unresponsive to all clients other than that browser socket. Even sending a
682682
header requesting that the client close the connection is not good enough,
683-
the browswer will simply open another one and sit on it.
683+
the browser will simply open another one and sit on it.
684684
"""
685685

686686
daemon_threads = True

chalice/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def remove_stage_from_deployed_values(key: str, filename: str) -> None:
5858
with open(filename, 'r') as f:
5959
final_values = json.load(f)
6060
except IOError:
61-
# If there is no file to delete from, then this funciton is a noop.
61+
# If there is no file to delete from, then this function is a noop.
6262
return
6363

6464
try:

docs/source/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ Websockets
16281628

16291629
.. class:: WebsocketEvent()
16301630

1631-
Event object event that is passed as the sole arugment to any handler
1631+
Event object event that is passed as the sole argument to any handler
16321632
function decorated with one of the three websocket related handlers:
16331633
``on_ws_connect``, ``on_ws_disconnect``, ``on_ws_message``.
16341634

@@ -1812,7 +1812,7 @@ Testing
18121812

18131813
.. attribute:: headers
18141814

1815-
A dictionary of HTTP headers in the resopnse.
1815+
A dictionary of HTTP headers in the response.
18161816

18171817
.. attribute:: status_code
18181818

docs/source/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ APIs, and decorators to connect various AWS event sources to
2929
Lambda functions. It then can integrate with AWS SAM by offloading
3030
the deployment to AWS CloudFormation.
3131

32-
**Q: How does Chalice compare to other similiar frameworks?**
32+
**Q: How does Chalice compare to other similar frameworks?**
3333

3434
The biggest difference between Chalice and other frameworks is that Chalice
3535
is focused on using a familiar, decorator-based API to write serverless

0 commit comments

Comments
 (0)