8000 rfctr: bulk remove __slots__ · python-openxml/python-docx@ae6592b · GitHub
[go: up one dir, main page]

Skip to content

Commit ae6592b

Browse files
committed
rfctr: bulk remove __slots__
1 parent 5cd150e commit ae6592b

File tree

10 files changed

+0
-32
lines changed

10 files changed

+0
-32
lines changed

src/docx/dml/color.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class ColorFormat(ElementProxy):
99
"""Provides access to color settings such as RGB color, theme color, and luminance
1010
adjustments."""
1111

12-
__slots__ = ()
13-
1412
def __init__(self, rPr_parent):
1513
super(ColorFormat, self).__init__(rPr_parent)
1614

src/docx/document.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class Document(ElementProxy):
1515
a document.
1616
"""
1717

18-
__slots__ = ("_part", "__body")
19-
2018
def __init__(self, element, part):
2119
super(Document, self).__init__(element)
2220
self._part = part

src/docx/settings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class Settings(ElementProxy):
99
Accessed using the :attr:`.Document.settings` property.
1010
"""
1111

12-
__slots__ = ()
13-
1412
@property
1513
def odd_and_even_pages_header_footer(self):
1614
"""True if this document has distinct odd and even page headers and footers.

src/docx/shared.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ class ElementProxy(object):
165165
common type of class in python-docx other than custom element (oxml) classes.
166166
"""
167167

168-
__slots__ = ("_element", "_parent")
169-
170168
def __init__(self, element, parent=None):
171169
self._element = element
172170
self._parent = parent

src/docx/styles/latent.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class LatentStyles(ElementProxy):
99
to the collection of |_LatentStyle| objects that define overrides of those defaults
1010
for a particular named latent style."""
1111

12-
__slots__ = ()
13-
1412
def __getitem__(self, key):
1513
"""Enables dictionary-style access to a latent style by name."""
1614
style_name = BabelFish.ui2internal(key)
@@ -118,8 +116,6 @@ class _LatentStyle(ElementProxy):
118116
`w:latentStyles` element.
119117
"""
120118

121-
__slots__ = ()
122-
123119
def delete(self):
124120
"""Remove this latent style definition such that the defaults defined in the
125121
containing |LatentStyles| object provide the effective value for each of its

src/docx/styles/style.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class BaseStyle(ElementProxy):
2727
These properties and methods are inherited by all style objects.
2828
"""
2929

30-
__slots__ = ()
31-
3230
@property
3331
def builtin(self):
3432
"""Read-only.
@@ -162,8 +160,6 @@ class _CharacterStyle(BaseStyle):
162160
level formatting via the |Font| object in its :attr:`.font` property.
163161
"""
164162

165-
__slots__ = ()
166-
167163
@property
168164
def base_style(self):
169165
"""Style object this style inherits from or |None| if this style is not based on
@@ -192,8 +188,6 @@ class _ParagraphStyle(_CharacterStyle):
192188
as indentation and line-spacing.
193189
"""
194190

195-
__slots__ = ()
196-
197191
def __repr__(self):
198192
return "_ParagraphStyle('%s') id: %s" % (self.name, id(self))
199193

@@ -233,8 +227,6 @@ class _TableStyle(_ParagraphStyle):
233227
as special table formatting properties.
234228
"""
235229

236-
__slots__ = ()
237-
238230
def __repr__(self):
239231
return "_TableStyle('%s') id: %s" % (self.name, id(self))
240232

@@ -244,5 +236,3 @@ class _NumberingStyle(BaseStyle):
244236
245237
Not yet implemented.
246238
"""
247-
248-
__slots__ = ()

src/docx/styles/styles.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class Styles(ElementProxy):
1515
and dictionary-style access by style name.
1616
"""
1717

18-
__slots__ = ()
19-
2018
def __contains__(self, name):
2119
"""Enables `in` operator on style name."""
2220
internal_name = BabelFish.ui2internal(name)

src/docx/text/font.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ class Font(ElementProxy):
88
"""Proxy object wrapping the parent of a ``<w:rPr>`` element and providing access to
99
character properties such as font name, font size, bold, and subscript."""
1010

11-
__slots__ = ()
12-
1311
@property
1412
def all_caps(self):
1513
"""Read/write.

src/docx/text/parfmt.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class ParagraphFormat(ElementProxy):
99
"""Provides access to paragraph formatting such as justification, indentation, line
1010
spacing, space before and after, and widow/orphan control."""
1111

12-
__slots__ = ("_tab_stops",)
13-
1412
@property
1513
def alignment(self):
1614
"""A member of the :ref:`WdParagraphAlignment` enumeration specifying the

src/docx/text/tabstops.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ class TabStops(ElementProxy):
1313
to be constructed directly.
1414
"""
1515

16-
__slots__ = "_pPr"
17-
1816
def __init__(self, element):
1917
super(TabStops, self).__init__(element, None)
2018
self._pPr = element
@@ -79,8 +77,6 @@ class TabStop(ElementProxy):
7977
Accessed using list semantics on its containing |TabStops| object.
8078
"""
8179

82-
__slots__ = "_tab"
83-
8480
def __init__(self, element):
8581
super(TabStop, self).__init__(element, None)
8682
self._tab = element

0 commit comments

Comments
 (0)
0