Tools: lgtm: removes unused imports in Python scripts

This commit is contained in:
wmayer
2022-03-20 21:41:30 +01:00
parent c9dee5e70a
commit 42d48103e8
9 changed files with 8 additions and 21 deletions

View File

@@ -233,7 +233,6 @@ class GitControl(VersionControl):
if remote in self.remotes:
url=self.remotes[remote]
#rewrite github to public url
import re
match = re.match('git@github\.com:(\S+?)/(\S+\.git)',url) \
or re.match('https://github\.com/(\S+)/(\S+\.git)'\
,url)
@@ -331,7 +330,6 @@ class GitControl(VersionControl):
self.branch=self.branch[2:]
self.getremotes() #setup self.remotes and branchlst
remote='origin' #used to determine the url
self.geturl()
origin = None #remote for the blessed master
for fetchurl in ("git@github.com:FreeCAD/FreeCAD.git",\
@@ -350,8 +348,6 @@ class GitControl(VersionControl):
if self.branch == '(no branch)': #check for remote branches
if len(self.branchlst) >= 2:
self.branch = self.branchlst[1]
if '/' in self.branch:
remote=self.branch.split('/',1)[0]
else: # guess
self.branch = '(%s)' % \
os.popen("git describe --all --dirty").read().strip()

View File

@@ -29,7 +29,7 @@ Version:
0.1
"""
import os,sys,string,getopt
import os,sys,getopt
from os.path import join
# Globals

View File

@@ -1,7 +1,7 @@
import sys
#sys.path.append("")
from PySide import QtCore, QtGui
from PySide import QtGui
import FreeCADGui
class MainWindow(QtGui.QMainWindow):

View File

@@ -1,6 +1,6 @@
import sys
from PySide2 import QtCore, QtGui, QtWidgets
import FreeCAD, FreeCADGui
from PySide2 import QtWidgets
import FreeCADGui
class MainWindow(QtWidgets.QMainWindow):
def showEvent(self, event):

View File

@@ -1,11 +1,4 @@
# shell and operating system
import os
#import sys
#sys.path.append( "E:\\Develop\\Projekte\\FreeCADWin\\src\\Tools" )
from . import DistTools,FileTools
DistName = DistTools.BuildDistName()

View File

@@ -4,7 +4,7 @@
from __future__ import print_function # this allows py2 to print(str1,str2) correctly
import os, errno
import os
def temporary_exec(text, globals, locals):

View File

@@ -2,8 +2,7 @@
# -*- coding: utf-8 -*-
# (c) 2006 Juergen Riegel
from . import template, templateModuleApp,templateModuleGui
import generateBase.generateModel_Module
from . import template, templateModuleApp
class TemplateModule (template.ModelTemplate):
def Generate(self):

View File

@@ -3,9 +3,8 @@
# (c) 2006 Juergen Riegel
from . import template
import generateBase.generateModel_Module
class TemplateModuleGui (template.ModelTemplate):
def Generate(self):
print("Genertate() needs to be implemented in a Template class!")
print("Generate() needs to be implemented in a Template class!")

View File

@@ -50,7 +50,7 @@ Version:
0.4
"""
import os, re, sys
import os, sys
directories = [
{"tsname":"FreeCAD", "workingdir":"./src/Gui", "tsdir":"Language"},