Skip to content

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
hao.long authored and Hal committed Apr 7, 2020
1 parent 4bdddd1 commit c219b81
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
21 changes: 11 additions & 10 deletions src/photoshop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,21 +201,22 @@ def __exit__(self, exc_type, exc_val, exc_tb):

# All public APIs.
__all__ = (
'ActionDescriptor',
'ActionList',
'ActionReference',
'Application',
'SolidColor',
'TextFonts',
'TextItem',
'Session',
colors.__all__
[
'ActionDescriptor',
'ActionList',
'ActionReference',
'Application',
'SolidColor',
'TextFonts',
'TextItem',
'Session'
]
+ colors.__all__
+ save_options.__all__
+ enumerations.__all__
+ errors.__all__
)


__title__ = 'photoshop_python_api'
__version__ = '0.8.0'
__author__ = 'Long Hao'
Expand Down
2 changes: 1 addition & 1 deletion src/photoshop/_active_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@


class ActiveDocument(Document):
def __int__(self, parent):
def __init__(self, parent):
super().__init__(parent=parent)
1 change: 1 addition & 0 deletions src/photoshop/_artlayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from photoshop._layer import Layer


# pylint: disable=too-many-arguments
class ArtLayers(Photoshop):

def __init__(self, parent):
Expand Down
1 change: 1 addition & 0 deletions src/photoshop/_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from photoshop.enumerations import SaveOptions


# pylint: disable=too-many-public-methods
class Document(Photoshop):
object_name = 'Application'

Expand Down
1 change: 1 addition & 0 deletions src/photoshop/_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from photoshop.enumerations import BitsPerChannelType


# pylint: disable=too-many-public-methods
class Documents(Photoshop):
def __init__(self, parent):
super().__init__(parent=parent)
Expand Down
1 change: 1 addition & 0 deletions src/photoshop/_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from photoshop.enumerations import LayerKind


# pylint: disable=too-many-public-methods
class Layer(Photoshop):
def __init__(self, parent):
super().__init__(parent=parent)
Expand Down
9 changes: 5 additions & 4 deletions src/photoshop/_layers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from photoshop._core import Photoshop
from photoshop._artlayer import ArtLayer
from photoshop._layer import Layer
from photoshop.errors import COMError


class Layers(Photoshop):
Expand All @@ -17,10 +18,10 @@ def __len__(self):
def __getitem__(self, key):
item = self._layers[key]
try:
# If have text item will be return ArtLayer.
item.textItem
return ArtLayer(item)
except:
if hasattr(item, 'textItem'):
# If have text item will be return ArtLayer.
return ArtLayer(item)
except COMError:
return Layer(self._layers[key])

@property
Expand Down
1 change: 1 addition & 0 deletions src/photoshop/_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from photoshop.enumerations import SelectionType


# pylint: disable=too-many-public-methods
class Selection(Photoshop):
def __init__(self, parent=None):
super().__init__(parent=parent)
Expand Down

0 comments on commit c219b81

Please sign in to comment.