Skip to content

Commit

Permalink
Merge pull request #2392 from Cgettys/fix-lgtm-alerts
Browse files Browse the repository at this point in the history
Fix lgtm alerts
  • Loading branch information
kimkulling committed Mar 30, 2019
2 parents 7721e43 + e45d120 commit 3e19545
Show file tree
Hide file tree
Showing 10 changed files with 844 additions and 842 deletions.
1,092 changes: 545 additions & 547 deletions port/PyAssimp/pyassimp/core.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion port/PyAssimp/pyassimp/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"STL",
"IRR",
"Q3O",
"Q3D"
"Q3D",
"MS3D",
"Q3S",
"ZGL",
Expand Down
559 changes: 279 additions & 280 deletions port/PyAssimp/pyassimp/helper.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions port/PyAssimp/pyassimp/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@
aiProcess_GenEntityMeshes = 0x100000
aiProcess_OptimizeAnimations = 0x200000
aiProcess_FixTexturePaths = 0x200000
aiProcess_EmbedTextures = 0x10000000,

## @def aiProcess_ConvertToLeftHanded
# @brief Shortcut flag for Direct3D-based applications.
Expand Down
4 changes: 2 additions & 2 deletions port/PyAssimp/pyassimp/structs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#-*- coding: UTF-8 -*-

from ctypes import POINTER, c_void_p, c_int, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte, c_size_t, c_uint32
from ctypes import POINTER, c_void_p, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte, c_size_t, c_uint32


class Vector2D(Structure):
Expand Down Expand Up @@ -70,7 +70,7 @@ class String(Structure):
See 'types.h' for details.
"""

MAXLEN = 1024
MAXLEN = 1024

_fields_ = [
# Binary length of the string excluding the terminal 0. This is NOT the
Expand Down
5 changes: 3 additions & 2 deletions port/PyAssimp/scripts/fixed_pipeline_3d_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
- ASSIMP's C++ SimpleOpenGL viewer
"""

import os, sys
import sys
from OpenGL.GLUT import *
from OpenGL.GLU import *
from OpenGL.GL import *

import logging;logger = logging.getLogger("pyassimp_opengl")
import logging
logger = logging.getLogger("pyassimp_opengl")
logging.basicConfig(level=logging.INFO)

import math
Expand Down
6 changes: 3 additions & 3 deletions port/PyAssimp/scripts/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This module demonstrates the functionality of PyAssimp.
"""

import os, sys
import sys
import logging
logging.basicConfig(level=logging.INFO)

Expand Down Expand Up @@ -50,8 +50,8 @@ def main(filename=None):
print(" colors:" + str(len(mesh.colors)))
tcs = mesh.texturecoords
if tcs.any():
for index, tc in enumerate(tcs):
print(" texture-coords "+ str(index) + ":" + str(len(tcs[index])) + "first3:" + str(tcs[index][:3]))
for tc_index, tc in enumerate(tcs):
print(" texture-coords "+ str(tc_index) + ":" + str(len(tcs[tc_index])) + "first3:" + str(tcs[tc_index][:3]))

else:
print(" no texture coordinates")
Expand Down
4 changes: 3 additions & 1 deletion scripts/BlenderImporter/genblenddna.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ def main():
#s += "#endif\n"

output.write(templt.replace("<HERE>",s))


# we got here, so no error
return 0

if __name__ == "__main__":
sys.exit(main())
10 changes: 5 additions & 5 deletions scripts/StepImporter/CppGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,8 @@ def handle_unset_args(field,entity,schema,argnum):
return n+template_allow_optional.format()

def get_single_conversion(field,schema,argnum=0,classname='?'):
typen = field.type
name = field.name
if field.collection:
typen = 'LIST'
return template_convert_single.format(type=typen,name=name,argnum=argnum,classname=classname,full_type=field.fullspec)
return template_convert_single.format(name=name,argnum=argnum,classname=classname,full_type=field.fullspec)

def count_args_up(entity,schema):
return len(entity.members) + (count_args_up(schema.entities[entity.parent],schema) if entity.parent else 0)
Expand Down Expand Up @@ -218,7 +215,7 @@ def get_deriv(e,out): # bit slow, but doesn't matter here
return res

def get_hierarchy(e,schema):
return get_derived(e.schema)+[e.name]+get_base_classes(e,schema)
return get_derived(e, schema)+[e.name]+get_base_classes(e,schema)

def sort_entity_list(schema):
deps = []
Expand Down Expand Up @@ -300,5 +297,8 @@ def work(filename):
with open(output_file_cpp,'wt') as outp:
outp.write(inp.read().replace('{schema-static-table}',schema_table).replace('{converter-impl}',converters))

# Finished without error, so return 0
return 0

if __name__ == "__main__":
sys.exit(work(sys.argv[1] if len(sys.argv)>1 else 'schema.exp'))
3 changes: 2 additions & 1 deletion scripts/StepImporter/ExpressReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"""Parse an EXPRESS file and extract basic information on all
entities and data types contained"""

import sys, os, re
import sys
import re
from collections import OrderedDict

re_match_entity = re.compile(r"""
Expand Down

0 comments on commit 3e19545

Please sign in to comment.