Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Commit 128536a

Browse files
authored
Fix docstrings in some base classes (#634)
1 parent 8fdd866 commit 128536a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pyof/foundation/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ def is_bitmask(self):
261261

262262
class UBIntBase(GenericType):
263263
"""Base class for UBInt{8,16,32,64,128}."""
264+
264265
def __int__(self):
265266
"""Allow converting an UBInt() back to an int()."""
266267
# Skip GenericType's checking if this is an Enum ou BitMask
@@ -497,7 +498,7 @@ class GenericStruct(metaclass=MetaStruct):
497498
"""
498499

499500
def __init__(self):
500-
"""Contructor takes no argument and stores attributes' deep copies."""
501+
"""Store attributes' deep copies."""
501502
for name, value in self.get_class_attributes():
502503
setattr(self, name, deepcopy(value))
503504

@@ -556,7 +557,7 @@ def get_class_attributes(cls):
556557
557558
This method strict relies on the PEP 520 (Preserving Class Attribute
558559
Definition Order), implemented on Python 3.6. So, if this behaviour
559-
changes this whole lib can loose its functionality (since the
560+
changes this whole lib can lose its functionality (since the
560561
attributes order are a strong requirement.) For the same reason, this
561562
lib will not work on python versions earlier than 3.6.
562563
@@ -573,7 +574,7 @@ def get_class_attributes(cls):
573574
#: see this method docstring for a important notice about the use of
574575
#: cls.__dict__
575576
for name, value in cls.__dict__.items():
576-
# gets only our (kytos) attributes. this ignores methods, dunder
577+
# gets only our (pyof) attributes. this ignores methods, dunder
577578
# methods and attributes, and common python type attributes.
578579
if GenericStruct._is_pyof_attribute(value):
579580
yield (name, value)

pyof/v0x04/controller2switch/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def __init__(self, items=None):
609609

610610

611611
class TableFeatures(GenericStruct):
612-
"""Abstration of common class Table Features.
612+
"""Abstraction of common class Table Features.
613613
614614
Body for MultipartRequest of type OFPMP_TABLE_FEATURES.
615615
Body of reply to OFPMP_TABLE_FEATURES request.

0 commit comments

Comments
 (0)