Cleanup: resolve pylint warnings
This commit is contained in:
@@ -62,7 +62,6 @@ def main() -> None:
|
||||
|
||||
if sys.platform == "linux":
|
||||
strip_libs(args.directory)
|
||||
return
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -86,19 +86,22 @@ They can be set using the ``shader.uniform_*`` functions after the shader has be
|
||||
|
||||
.. note::
|
||||
|
||||
It is important to note that GLSL sources are reinterpreted to MSL (Metal Shading Language) on Apple operating systems.
|
||||
It is important to note that GLSL sources are reinterpreted to MSL (Metal Shading Language)
|
||||
on Apple operating systems.
|
||||
This uses a small compatibility layer that does not cover the whole GLSL language specification.
|
||||
Here is a list of differences to keep in mind when targeting compatibility with Apple platforms:
|
||||
|
||||
* The only matrix constructors available are:
|
||||
- The only matrix constructors available are:
|
||||
|
||||
- diagonal scalar (example: ``mat2(1)``)
|
||||
- all scalars (example: ``mat2(1, 0, 0, 1)``)
|
||||
- column vector (example: ``mat2(vec2(1,0), vec2(0,1))``)
|
||||
- reshape constructors work only for square matrices (example: ``mat3(mat4(1))``)
|
||||
|
||||
* ``vertex``, ``fragment`` and ``kernel`` are reserved keywords.
|
||||
* all types and keywords defined by the `MSL specification <https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf>`__ are reserved keywords and should not be used.
|
||||
- ``vertex``, ``fragment`` and ``kernel`` are reserved keywords.
|
||||
- all types and keywords defined by the
|
||||
`MSL specification <https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf>`__
|
||||
are reserved keywords and should not be used.
|
||||
|
||||
|
||||
Batch Creation
|
||||
|
||||
@@ -487,8 +487,11 @@ class InfoPropertyRNA:
|
||||
|
||||
if self.is_path_supports_templates:
|
||||
type_info.append(
|
||||
"Supports `template expressions <https://docs.blender.org/manual/en/{:d}.{:d}/files/file_paths.html#path-templates>`_".format(
|
||||
*bpy.app.version[:2]))
|
||||
"Supports `template expressions "
|
||||
"<https://docs.blender.org/manual/en/{:d}.{:d}/files/file_paths.html#path-templates>`_".format(
|
||||
*bpy.app.version[:2],
|
||||
),
|
||||
)
|
||||
|
||||
if type_info:
|
||||
type_str += ", ({:s})".format(", ".join(type_info))
|
||||
|
||||
@@ -1744,9 +1744,12 @@ class IMAGE_PT_overlay_render_guides(Panel):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
sima = context.space_data
|
||||
return ((sima.mode == 'MASK' or sima.mode == 'VIEW') and
|
||||
(sima.image and sima.image.source == 'VIEWER' and
|
||||
sima.image.type == 'COMPOSITING'))
|
||||
return (
|
||||
(sima.mode in {'MASK', 'VIEW'}) and
|
||||
(image := sima.image) is not None and
|
||||
(image.source == 'VIEWER') and
|
||||
(image.type == 'COMPOSITING')
|
||||
)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
@@ -45,6 +45,7 @@ class SPREADSHEET_MT_editor_menus(bpy.types.Menu):
|
||||
bl_label = ""
|
||||
|
||||
def draw(self, context):
|
||||
del context
|
||||
layout = self.layout
|
||||
layout.menu("SPREADSHEET_MT_view")
|
||||
|
||||
|
||||
@@ -1245,6 +1245,7 @@ class PlayheadSnappingPanel:
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
del context
|
||||
return True
|
||||
|
||||
def draw(self, context):
|
||||
|
||||
@@ -27,6 +27,8 @@ import re
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
from gitea_utils import (
|
||||
gitea_json_activities_get,
|
||||
gitea_json_pull_request_by_base_and_head_get,
|
||||
@@ -41,7 +43,6 @@ from typing import (
|
||||
from collections.abc import (
|
||||
Iterable,
|
||||
)
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
# Support piping the output to a file or process.
|
||||
IS_ATTY = sys.stdout.isatty()
|
||||
@@ -243,7 +244,10 @@ def report_personal_weekly_get(
|
||||
# against the default branch of the target repository.
|
||||
if not is_release_branch and target_repo_json:
|
||||
pr = gitea_json_pull_request_by_base_and_head_get(
|
||||
target_repo_fullname, target_repo_json["default_branch"], f"{repo_fullname}:{branch_name}")
|
||||
target_repo_fullname,
|
||||
target_repo_json["default_branch"],
|
||||
f"{repo_fullname}:{branch_name}",
|
||||
)
|
||||
branch = target_repo.branches[branch_name]
|
||||
|
||||
if pr:
|
||||
|
||||
Reference in New Issue
Block a user