Skip to content

Commit

Permalink
Fix typos (#275)
Browse files Browse the repository at this point in the history
* Fix typo for Hander

* Fix typos in error message
  • Loading branch information
aisk authored Jun 18, 2024
1 parent 07aa2d5 commit cfe9096
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions thriftpy2/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def __init__(self,

thttpserver = self

class RequestHander(http_server.BaseHTTPRequestHandler):
class RequestHandler(http_server.BaseHTTPRequestHandler):
# Don't care about the request path.

def do_POST(self):
Expand Down Expand Up @@ -153,7 +153,7 @@ def do_POST(self):
self.end_headers()
self.wfile.write(otrans.getvalue())

self.httpd = server_class(server_address, RequestHander)
self.httpd = server_class(server_address, RequestHandler)

def serve(self):
self.httpd.serve_forever()
Expand Down
2 changes: 1 addition & 1 deletion thriftpy2/parser/lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def t_LITERAL(t):
if s[i] in maps:
val += maps[s[i]]
else:
msg = 'Unexcepted escaping characher: %s' % s[i]
msg = 'Unexpected escaping character: %s' % s[i]
raise ThriftLexerError(msg)
else:
val += s[i]
Expand Down
2 changes: 1 addition & 1 deletion thriftpy2/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def p_const_ref(p):
father = child
child = getattr(child, name, None)
if child is None:
raise ThriftParserError('Cann\'t find name %r at line %d'
raise ThriftParserError('Can\'t find name %r at line %d'
% (p[1], p.lineno(1)))

if _get_ttype(child) is None or _get_ttype(father) == TType.I32:
Expand Down

0 comments on commit cfe9096

Please sign in to comment.