Skip to content

Commit

Permalink
Merge pull request #394 from howetuft/linting
Browse files Browse the repository at this point in the history
Linting
  • Loading branch information
howetuft committed May 4, 2024
2 parents 735d316 + 070987b commit 6deb84c
Show file tree
Hide file tree
Showing 21 changed files with 524 additions and 533 deletions.
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ callbacks=cb_, _cb,
getIcon,
setupContextMenu,
claimChildren,
setEdit,
execute,
attach,
updateData,
Expand Down Expand Up @@ -239,7 +240,7 @@ class-rgx=[A-Z_][a-zA-Z0-9]+$
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression matching correct method names
method-rgx=([a-z_][a-z0-9_]{2,}$|GetResources|Activated|onDocumentRestored|onChanged|onDelete|getDisplayModes|getDefaultDisplayMode|setDisplayMode|isShow|getIcon|setupContextMenu|claimChildren|Initialize|GetClassName|updateData|GetCommands)
method-rgx=([a-z_][a-z0-9_]{2,}$|GetResources|Activated|onDocumentRestored|onChanged|onDelete|getDisplayModes|getDefaultDisplayMode|setDisplayMode|isShow|getIcon|setEdit|setupContextMenu|claimChildren|Initialize|GetClassName|updateData|GetCommands)

# Regular expression which should only match function or class names that do
# not require a docstring.
Expand Down
4 changes: 2 additions & 2 deletions Render/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _hide_aspect_properties(self):
"""Hide aspect-related properties, to avoid confusion."""
set_editor_mode = self.fpo.setEditorMode

for prop in ["Color", "SectionColor", "Transparency"]:
for prop in ("Color", "SectionColor", "Transparency"):
try:
set_editor_mode(prop, 2)
except AttributeError:
Expand Down Expand Up @@ -166,7 +166,7 @@ def execute(self, obj):
# Eventually execute...
try:
super().execute(obj)
except AttributeError as err:
except AttributeError:
pass

def add_texture(self, img_path):
Expand Down
4 changes: 2 additions & 2 deletions Render/materialx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
if GuiUp:
from .materialx_downloader import MaterialXDownloader, open_mxdownloader
else:
MaterialXDownloader = None
open_mxdownloader = None
MaterialXDownloader = None # pylint: disable=invalid-name
open_mxdownloader = None # pylint: disable=invalid-name

0 comments on commit 6deb84c

Please sign in to comment.