Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Found via `codespell -L datas,ser,readd,wont,frameword` and `typos
--hidden --format brief`
  • Loading branch information
kianmeng committed Oct 27, 2024
1 parent 7bc85b3 commit 941878c
Show file tree
Hide file tree
Showing 34 changed files with 54 additions and 54 deletions.
4 changes: 2 additions & 2 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Foo(object):
# Exception instance in fail.value
```

Note that ``create_failure()`` can (and should) be called without arguments when inside an ``except`` block; this will give it a valid traceback instance. The only attribute you can depend on is ``fail.value`` which is the ``Exception`` instance. Otherwise use ``txaio.failre_*`` methods.
Note that ``create_failure()`` can (and should) be called without arguments when inside an ``except`` block; this will give it a valid traceback instance. The only attribute you can depend on is ``fail.value`` which is the ``Exception`` instance. Otherwise use ``txaio.failure_*`` methods.

How to **handler async methods** with txaio:

Expand Down Expand Up @@ -317,7 +317,7 @@ After the upload has finished, check the live pages:

* Automatic reconnection
* Configurable WAMP connecting transports
* WAMP Connection abstration
* WAMP Connection abstraction
* Authentication

**0.10** will get into "maintenance mode" after **0.10.6**. We'll have a maintenance branch for that over some time. The new development will be based on **0.11** (see below).
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Autobahn contains **NVX**, a network accelerator library that provides SIMD acce

.. note:
NVX lives in namespace `autobahn.nvx` and currently requires a x86-86 CPU with at least SSE2 and makes use of SSE4.1 if available. The code is written using vector instrinsics, should compile with both GCC and Clang,and interfaces with Python using CFFI, and hence runs fast on PyPy.
NVX lives in namespace `autobahn.nvx` and currently requires a x86-86 CPU with at least SSE2 and makes use of SSE4.1 if available. The code is written using vector intrinsics, should compile with both GCC and Clang,and interfaces with Python using CFFI, and hence runs fast on PyPy.
-----

Expand Down
2 changes: 1 addition & 1 deletion autobahn/asyncio/wamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def create():
# The permessage-deflate extensions offered to the server ..
offers = [PerMessageDeflateOffer()]

# Function to accept permessage_delate responses from the server ..
# Function to accept permessage_deflate responses from the server ..
def accept(response):
if isinstance(response, PerMessageDeflateResponse):
return PerMessageDeflateResponseAccept(response)
Expand Down
2 changes: 1 addition & 1 deletion autobahn/nvx/_utf8validator.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ int _nvx_utf8vld_validate_table (void* utf8vld, const uint8_t* data, size_t leng
state = 1; \
} \
} else if (state == 1) { \
/* refective state 1 */ \
/* reflective state 1 */ \
} else { \
/* should not arrive here */ \
}
Expand Down
2 changes: 1 addition & 1 deletion autobahn/twisted/wamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def accept(response):
# be applied for every Autobahn/Twisted protocol instance from the factory
transport_factory.setProtocolOptions(**protocol_options)

# supress pointless log noise
# suppress pointless log noise
transport_factory.noisy = False

if endpoint:
Expand Down
10 changes: 5 additions & 5 deletions autobahn/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def generate_token(char_groups: int,
:param chars_per_group: Number of characters per character group (or 1 to return a token with no grouping).
:param chars: Characters to choose from. Default is 27 character subset
of the ISO basic Latin alphabet (see: ``DEFAULT_TOKEN_CHARS``).
:param sep: When separating groups in the token, the separater string.
:param sep: When separating groups in the token, the separated string.
:param lower_case: If ``True``, generate token in lower-case.
:returns: The generated token.
Expand Down Expand Up @@ -751,7 +751,7 @@ class ObservableMixin(object):
# be a lot easier to deal with here. Having an __init__ method
# with a "mix in" style class can be fragile and error-prone,
# especially if it takes arguments. Since we don't use the
# "parent" beavior anywhere, I didn't add a .set_parent() (yet?)
# "parent" behavior anywhere, I didn't add a .set_parent() (yet?)

# these are class-level globals; individual instances are
# initialized as-needed (e.g. the first .on() call adds a
Expand All @@ -773,7 +773,7 @@ def set_valid_events(self, valid_events=None):
def _check_event(self, event):
"""
Internal helper. Throws RuntimeError if we have a valid_events
list, and the given event isnt' in it. Does nothing otherwise.
list, and the given event isn't in it. Does nothing otherwise.
"""
if self._valid_events and event not in self._valid_events:
raise RuntimeError(
Expand All @@ -789,7 +789,7 @@ def on(self, event, handler):
:param event: the name of the event
:param handler: a callable thats invoked when .fire() is
:param handler: a callable that's invoked when .fire() is
called for this events. Arguments will be whatever are given
to .fire()
"""
Expand All @@ -816,7 +816,7 @@ def off(self, event=None, handler=None):
# maybe this should mean "remove the given handler
# from any event at all that contains it"...?
raise RuntimeError(
"Can't specificy a specific handler without an event"
"Can't specify a specific handler without an event"
)
self._listeners = dict()
else:
Expand Down
6 changes: 3 additions & 3 deletions autobahn/wamp/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,15 @@ def reset(self):
set connection failure rates and retry-delay to initial values
"""
self.connect_attempts = 0
self.connect_sucesses = 0
self.connect_successes = 0
self.connect_failures = 0
self.retry_delay = self.initial_retry_delay

def failed(self):
"""
Mark this transport as failed, meaning we won't try to connect to
it any longer (that is: can_reconnect() will always return
False afer calling this).
False after calling this).
"""
self._permanent_failure = True

Expand Down Expand Up @@ -797,7 +797,7 @@ def on_leave(session, details):
# then disconnect this session
def on_join(session, details):
transport.reset()
transport.connect_sucesses += 1
transport.connect_successes += 1
self.log.debug("session on_join: {details}", details=details)
d = txaio.as_future(self._entry, reactor, session)

Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ApplicationError(Error):

PAYLOAD_SIZE_EXCEEDED = "wamp.error.payload_size_exceeded"
"""
The application payload could not be transported becuase the serialized/framed payload
The application payload could not be transported because the serialized/framed payload
exceeds the transport limits.
"""

Expand Down Expand Up @@ -144,7 +144,7 @@ class ApplicationError(Error):

NO_SUCH_SESSION = "wamp.error.no_such_session"
"""
A router could not perform an operation, since a session ID specified was non-existant.
A router could not perform an operation, since a session ID specified was non-existent.
"""

INVALID_ARGUMENT = "wamp.error.invalid_argument"
Expand Down
2 changes: 1 addition & 1 deletion autobahn/wamp/flatbuffers/pubsub.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ table Event
// When using Payload.CRYPTOBOX, the public Cryptobox key of the key pair used for encrypting the payload.
enc_key: [uint8];

// The WAMP session ID of the pubisher. Only filled when the publisher is disclosed.
// The WAMP session ID of the publisher. Only filled when the publisher is disclosed.
publisher: uint64;

// The WAMP authrole of the publisher. Only filled when publisher is disclosed.
Expand Down
2 changes: 1 addition & 1 deletion autobahn/wamp/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def onUserError(self, fail, msg):
current stack-trace and then error-message to stdout.
ApplicationSession-derived objects may override this to
provide logging if they prefer. The Twisted implemention does
provide logging if they prefer. The Twisted implementation does
this. (See :class:`autobahn.twisted.wamp.ApplicationSession`)
:param fail: The failure that occurred.
Expand Down
6 changes: 3 additions & 3 deletions autobahn/wamp/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ def parse(wmsg):
session = check_or_raise_id(wmsg[1], "'session' in WELCOME")
details = check_or_raise_extra(wmsg[2], "'details' in WELCOME")

# FIXME: tigher value checking (types, URIs etc)
# FIXME: tighter value checking (types, URIs etc)
realm = details.get('realm', None)
authid = details.get('authid', None)
authrole = details.get('authrole', None)
Expand Down Expand Up @@ -1876,7 +1876,7 @@ def __init__(self,
assert(retain is None or type(retain) == bool)
assert(transaction_hash is None or type(transaction_hash) == str)

# publisher exlusion and black-/whitelisting
# publisher exclusion and black-/whitelisting
assert(exclude_me is None or type(exclude_me) == bool)

assert(exclude is None or type(exclude) == list)
Expand Down Expand Up @@ -1930,7 +1930,7 @@ def __init__(self,
self._payload = payload
self._acknowledge = acknowledge

# publisher exlusion and black-/whitelisting
# publisher exclusion and black-/whitelisting
self._exclude_me = exclude_me
self._exclude = exclude
self._exclude_authid = exclude_authid
Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def _exception_from_message(self, msg):
else:
exc = exception.ApplicationError(msg.error)

# FIXME: cleanup and integate into ctors above
# FIXME: cleanup and integrate into ctors above
if hasattr(exc, 'enc_algo'):
exc.enc_algo = msg.enc_algo
if hasattr(exc, 'callee'):
Expand Down Expand Up @@ -1237,7 +1237,7 @@ def error(err):
reg = self._registrations[msg.registration]
except KeyError:
raise ProtocolError(
"UNREGISTERED received for non-existant registration"
"UNREGISTERED received for non-existent registration"
" ID {0}".format(msg.registration)
)
self.log.debug(
Expand Down
2 changes: 1 addition & 1 deletion autobahn/wamp/test/test_wamp_component_aio.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def create_connection(protocol_factory=None, server_hostname=None, host=None, po
txaio.config.loop = event_loop

# now that we've started connecting, we *should* be able
# to connetion_lost our transport .. but we do a
# to connection_lost our transport .. but we do a
# call-later to ensure we're after the setup stuff in the
# event-loop (because asyncio doesn't synchronously
# process already-completed Futures like Twisted does)
Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/test/test_wamp_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def errback(fail):
self.assertEqual(1, len(got_errors))
# ...now let the async errback continue by completing the
# Deferred we returned in our errback (could be fail or
# success, shoudln't matter)
# success, shouldn't matter)
error_d.callback(None)

# ensure we (now) get our errback
Expand Down Expand Up @@ -666,7 +666,7 @@ def test_unregister_no_such_registration(self):
message.Unregister(0, 1234)
)
self.assertIn(
"UNREGISTERED received for non-existant registration",
"UNREGISTERED received for non-existent registration",
str(ctx.exception)
)

Expand Down
4 changes: 2 additions & 2 deletions autobahn/wamp/test/test_wamp_user_handler_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_on_join(self):
session.onJoin = exception_raiser(exception)
msg = create_mock_welcome()

# give the sesion a WELCOME, from which it should call onJoin
# give the session a WELCOME, from which it should call onJoin
session.onMessage(msg)

# make sure we got the right error out of onUserError
Expand All @@ -133,7 +133,7 @@ def test_on_join_deferred(self):
session.onJoin = async_exception_raiser(exception)
msg = create_mock_welcome()

# give the sesion a WELCOME, from which it should call onJoin
# give the session a WELCOME, from which it should call onJoin
session.onMessage(msg)

# make sure we got the right error out of onUserError
Expand Down
2 changes: 1 addition & 1 deletion autobahn/websocket/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ def onFrameData(self, payload):
compressedLen = len(payload)
self.log.debug(
"RX compressed [length]: octets",
legnth=compressedLen,
length=compressedLen,
octets=_LazyHexFormatter(payload),
)

Expand Down
2 changes: 1 addition & 1 deletion autobahn/websocket/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __init__(self, host=None, port=None, resource=None, headers=None, useragent=
:param int port: the port to present to the server
:param str resouce:
:param str resource:
:param headers: extra HTTP headers to send in the opening handshake
:type headers: dict
Expand Down
2 changes: 1 addition & 1 deletion autobahn/xbr/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ async def _do_market_realm(self, details):
# buyer/seller (payment/paying) channel
channel_type = self.config.extra['channel_type']

# the delgate allowed to use the channel
# the delegate allowed to use the channel
delegate = self.config.extra['delegate']

# amount of market coins for initial channel balance
Expand Down
2 changes: 1 addition & 1 deletion autobahn/xbr/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def convert(self, value, param, ctx):
value = web3.Web3.toChecksumAddress(value)
adr = binascii.a2b_hex(value[2:])
if len(value) != 20:
raise ValueError('Ethereum addres must be 20 bytes (160 bit), but was {} bytes'.format(len(adr)))
raise ValueError('Ethereum address must be 20 bytes (160 bit), but was {} bytes'.format(len(adr)))
except Exception as e:
self.fail(style_error(str(e)))
else:
Expand Down
4 changes: 2 additions & 2 deletions autobahn/xbr/_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ApplicationWindow(Gtk.Assistant):

SELECTED_NONE = 0
SELECTED_NEW = 1
SELECTED_SYNCRONIZE = 2
SELECTED_SYNCHRONIZE = 2
SELECTED_RECOVER = 3

def __init__(self, reactor, session, config, config_path, profile, profile_name):
Expand Down Expand Up @@ -273,7 +273,7 @@ def on_button22(res):
button2 = Gtk.Button.new_with_label('Synchronize account')

def on_button2(res):
self.log.info('SELECTED_SYNCRONIZE: {res}', res=res)
self.log.info('SELECTED_SYNCHRONIZE: {res}', res=res)
self.set_current_page(2)

button2.connect('clicked', on_button2)
Expand Down
2 changes: 1 addition & 1 deletion autobahn/xbr/_mnemonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def parse_derivation_path(str_derivation_path):


def mnemonic_to_private_key(mnemonic, str_derivation_path=LEDGER_ETH_DERIVATION_PATH, passphrase=""):
""" Performs all convertions to get a private key from a mnemonic sentence, including:
""" Performs all conversions to get a private key from a mnemonic sentence, including:
BIP39 mnemonic to seed
BIP32 seed to master key
Expand Down
2 changes: 1 addition & 1 deletion autobahn/xbr/_seller.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def close_channel(self, market_maker_adr, channel_oid, channel_seq, channel_bala

def sell(self, market_maker_adr, buyer_pubkey, key_id, channel_oid, channel_seq, amount, balance, signature, details=None):
"""
Called by a XBR Market Maker to buy a data encyption key. The XBR Market Maker here is
Called by a XBR Market Maker to buy a data encryption key. The XBR Market Maker here is
acting for (triggered by) the XBR buyer delegate.
:param market_maker_adr: The market maker Ethereum address. The technical buyer is usually the
Expand Down
4 changes: 2 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ Changelog
18.9.1
------

* new: Interrupt has Options.reason to signal detailed origin of call cancelation (active cancel vs passive timeout)
* new: Interrupt has Options.reason to signal detailed origin of call cancellation (active cancel vs passive timeout)
* fix: Cancel and Interrupt gets ``"killnowait"`` mode
* new: Cancel and Interrupt no longer have ``ABORT/"abort"``

Expand Down Expand Up @@ -786,7 +786,7 @@ Changelog
* new: support new UBJSON WAMP serialization format
* new: publish universal wheels
* fix: replaced `msgpack-python` with `u-msgpack-python`
* fix: some glitches with `eligible / exlude` when used with `authid / authrole`
* fix: some glitches with `eligible / exclude` when used with `authid / authrole`
* fix: some logging glitches
* fix: pin Twisted at 16.1.1 (for now)

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/autobahn.asyncio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Autobahn asyncio specific classes. These are used when asyncio is run as the und
Component
---------

The component API provides a high-level funcional style method of defining and running WAMP components including authentication configuration
The component API provides a high-level functional style method of defining and running WAMP components including authentication configuration

.. autoclass:: autobahn.asyncio.component.Component
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/autobahn.twisted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Autobahn Twisted specific classes. These are used when Twisted is run as the und
Component
---------

The component API provides a high-level funcional style method of defining and running WAMP components including authentication configuration
The component API provides a high-level functional style method of defining and running WAMP components including authentication configuration

.. autoclass:: autobahn.twisted.component.Component
:members:
Expand Down
Loading

0 comments on commit 941878c

Please sign in to comment.