Skip to content

Commit 350e87a

Browse files
authored
Merge pull request #598 from kianmeng/fix-typos
Fix typos
2 parents 6153844 + f16e1c1 commit 350e87a

17 files changed

+23
-23
lines changed

Diff for: docs/3rd-party-py3k-compat-code/jinja2_compat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def encode_filename(filename):
8585

8686
def with_metaclass(meta, *bases):
8787
# This requires a bit of explanation: the basic idea is to make a
88-
# dummy metaclass for one level of class instanciation that replaces
88+
# dummy metaclass for one level of class instantiation that replaces
8989
# itself with the actual metaclass. Because of internal type checks
9090
# we also need to make sure that we downgrade the custom metaclass
9191
# for one level to something closer to type (that's why __call__ and

Diff for: docs/notebooks/object special methods (next, bool, ...).ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"collapsed": false,
6464
"input": [
6565
"# Py3-style iterators written as new-style classes (subclasses of\n",
66-
"# future.builtins.object) are backward compatibile with Py2:\n",
66+
"# future.builtins.object) are backward compatible with Py2:\n",
6767
"class Upper(object):\n",
6868
" def __init__(self, iterable):\n",
6969
" self._iter = iter(iterable)\n",

Diff for: docs/standard_library_imports.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ As of version 0.14, the ``future`` package comes with top-level packages for
1515
Python 2.x that provide access to the reorganized standard library modules
1616
under their Python 3.x names.
1717

18-
Direct imports are the preferred mechanism for accesing the renamed standard
18+
Direct imports are the preferred mechanism for accessing the renamed standard
1919
library modules in Python 2/3 compatible code. For example, the following clean
2020
Python 3 code runs unchanged on Python 2 after installing ``future``::
2121

Diff for: docs/whatsnew.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ This is a major bug-fix and feature release, including:
9595
- Fix an issue with copyreg import under Py3 that results in unexposed stdlib functionality
9696
- Export and document types in future.utils
9797
- Update behavior of newstr.__eq__() to match str.__eq__() as per reference docs
98-
- Fix raising and the raising fixer to handle cases where the syntax is ambigious
98+
- Fix raising and the raising fixer to handle cases where the syntax is ambiguous
9999
- Allow "default" parameter in min() and max() (Issue #334)
100100
- Implement __hash__() in newstr (Issue #454)
101101
- Future proof some version checks to handle the fact that Py4 won't be a major breaking release
@@ -127,7 +127,7 @@ This is a major bug-fix release, including:
127127
- Fix ``past.translation`` on read-only file systems
128128
- Fix Tkinter import bug introduced in Python 2.7.4 (issue #262)
129129
- Correct TypeError to ValueError in a specific edge case for newrange
130-
- Support inequality tests betwen newstrs and newbytes
130+
- Support inequality tests between newstrs and newbytes
131131
- Add type check to __get__ in newsuper
132132
- Fix fix_divsion_safe to support better conversion of complex expressions, and
133133
skip obvious float division.

Diff for: src/future/backports/datetime.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ def today(cls):
689689

690690
@classmethod
691691
def fromordinal(cls, n):
692-
"""Contruct a date from a proleptic Gregorian ordinal.
692+
"""Construct a date from a proleptic Gregorian ordinal.
693693
694694
January 1 of year 1 is day 1. Only the year, month and day are
695695
non-zero in the result.

Diff for: src/future/backports/email/_header_value_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2867,7 +2867,7 @@ def parse_content_type_header(value):
28672867
_find_mime_parameters(ctype, value)
28682868
return ctype
28692869
ctype.append(token)
2870-
# XXX: If we really want to follow the formal grammer we should make
2870+
# XXX: If we really want to follow the formal grammar we should make
28712871
# mantype and subtype specialized TokenLists here. Probably not worth it.
28722872
if not value or value[0] != '/':
28732873
ctype.defects.append(errors.InvalidHeaderDefect(

Diff for: src/future/backports/email/parser.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self, _class=Message, **_3to2kwargs):
2626
textual representation of the message.
2727
2828
The string must be formatted as a block of RFC 2822 headers and header
29-
continuation lines, optionally preceeded by a `Unix-from' header. The
29+
continuation lines, optionally preceded by a `Unix-from' header. The
3030
header block is terminated either by the end of the string or by a
3131
blank line.
3232
@@ -92,7 +92,7 @@ def __init__(self, *args, **kw):
9292
textual representation of the message.
9393
9494
The input must be formatted as a block of RFC 2822 headers and header
95-
continuation lines, optionally preceeded by a `Unix-from' header. The
95+
continuation lines, optionally preceded by a `Unix-from' header. The
9696
header block is terminated either by the end of the input or by a
9797
blank line.
9898

Diff for: src/future/backports/xmlrpc/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ def close(self):
12511251
# Send HTTP request.
12521252
#
12531253
# @param host Host descriptor (URL or (URL, x509 info) tuple).
1254-
# @param handler Targer RPC handler (a path relative to host)
1254+
# @param handler Target RPC handler (a path relative to host)
12551255
# @param request_body The XML-RPC request body
12561256
# @param debug Enable debugging if debug is true.
12571257
# @return An HTTPConnection.

Diff for: src/future/standard_library/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import socketserver
1818
import winreg # on Windows only
1919
import test.support
20-
import html, html.parser, html.entites
20+
import html, html.parser, html.entities
2121
import http, http.client, http.server
2222
import http.cookies, http.cookiejar
2323
import urllib.parse, urllib.request, urllib.response, urllib.error, urllib.robotparser

Diff for: src/future/types/newint.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def to_bytes(self, length, byteorder='big', signed=False):
318318
bits = length * 8
319319
num = (2**bits) + self
320320
if num <= 0:
321-
raise OverflowError("int too smal to convert")
321+
raise OverflowError("int too small to convert")
322322
else:
323323
if self < 0:
324324
raise OverflowError("can't convert negative int to unsigned")

Diff for: src/future/types/newrange.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def index(self, value):
105105
raise ValueError('%r is not in range' % value)
106106

107107
def count(self, value):
108-
"""Return the number of ocurrences of integer `value`
108+
"""Return the number of occurrences of integer `value`
109109
in the sequence this range represents."""
110110
# a value can occur exactly zero or one times
111111
return int(value in self)

Diff for: src/libfuturize/fixer_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def suitify(parent):
116116
"""
117117
for node in parent.children:
118118
if node.type == syms.suite:
119-
# already in the prefered format, do nothing
119+
# already in the preferred format, do nothing
120120
return
121121

122122
# One-liners have no suite node, we have to fake one up

Diff for: src/libfuturize/fixes/fix_metaclass.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
def has_metaclass(parent):
3939
""" we have to check the cls_node without changing it.
40-
There are two possiblities:
40+
There are two possibilities:
4141
1) clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
4242
2) clsdef => simple_stmt => expr_stmt => Leaf('__meta')
4343
"""
@@ -63,7 +63,7 @@ def fixup_parse_tree(cls_node):
6363
# already in the preferred format, do nothing
6464
return
6565

66-
# !%@#! oneliners have no suite node, we have to fake one up
66+
# !%@#! one-liners have no suite node, we have to fake one up
6767
for i, node in enumerate(cls_node.children):
6868
if node.type == token.COLON:
6969
break

Diff for: tests/test_future/test_http_cookiejar.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ class CookieTests(unittest.TestCase):
380380
## comma-separated list, it'll be a headache to parse (at least my head
381381
## starts hurting every time I think of that code).
382382
## - Expires: You'll get all sorts of date formats in the expires,
383-
## including emtpy expires attributes ("expires="). Be as flexible as you
383+
## including empty expires attributes ("expires="). Be as flexible as you
384384
## can, and certainly don't expect the weekday to be there; if you can't
385385
## parse it, just ignore it and pretend it's a session cookie.
386386
## - Domain-matching: Netscape uses the 2-dot rule for _all_ domains, not
@@ -1734,7 +1734,7 @@ def test_session_cookies(self):
17341734
key = "%s_after" % cookie.value
17351735
counter[key] = counter[key] + 1
17361736

1737-
# a permanent cookie got lost accidently
1737+
# a permanent cookie got lost accidentally
17381738
self.assertEqual(counter["perm_after"], counter["perm_before"])
17391739
# a session cookie hasn't been cleared
17401740
self.assertEqual(counter["session_after"], 0)

Diff for: tests/test_future/test_standard_library.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def test_future_moves_dbm(self):
593593
from future.moves.dbm import ndbm
594594

595595

596-
# Running the following tkinter test causes the following bizzare test failure:
596+
# Running the following tkinter test causes the following bizarre test failure:
597597
#
598598
# ======================================================================
599599
# FAIL: test_open_default_encoding (future.tests.test_builtins.BuiltinTest)

Diff for: tests/test_future/test_urllib.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Regresssion tests for urllib"""
1+
"""Regression tests for urllib"""
22
from __future__ import absolute_import, division, unicode_literals
33

44
import io
@@ -1229,7 +1229,7 @@ def open_spam(self, url):
12291229
# Everywhere else they work ok, but on those machines, sometimes
12301230
# fail in one of the tests, sometimes in other. I have a linux, and
12311231
# the tests go ok.
1232-
# If anybody has one of the problematic enviroments, please help!
1232+
# If anybody has one of the problematic environments, please help!
12331233
# . Facundo
12341234
#
12351235
# def server(evt):

Diff for: tests/test_future/test_urllib_toplevel.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Regresssion tests for urllib"""
1+
"""Regression tests for urllib"""
22
from __future__ import absolute_import, division, unicode_literals
33

44
import io
@@ -1247,7 +1247,7 @@ def open_spam(self, url):
12471247
# Everywhere else they work ok, but on those machines, sometimes
12481248
# fail in one of the tests, sometimes in other. I have a linux, and
12491249
# the tests go ok.
1250-
# If anybody has one of the problematic enviroments, please help!
1250+
# If anybody has one of the problematic environments, please help!
12511251
# . Facundo
12521252
#
12531253
# def server(evt):

0 commit comments

Comments
 (0)