Add BIM workbench to .pre-commit-config.yaml (#21591)

* Add BIM workbench to .pre-commit-config.yaml

* pre-commit: ignore translations

* pre-commit: add additional ignore pattern

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Furgo
2025-10-13 13:07:48 +02:00
committed by GitHub
parent 210190cdd7
commit 6345b824e5
197 changed files with 21982 additions and 13836 deletions

View File

@@ -109,9 +109,7 @@ class BIM_Tutorial:
return
# load tutorial from wiki
offlineloc = os.path.join(
FreeCAD.getUserAppDataDir(), "BIM", "Tutorial", "Tutorial.html"
)
offlineloc = os.path.join(FreeCAD.getUserAppDataDir(), "BIM", "Tutorial", "Tutorial.html")
try:
u = urllib2.urlopen(URL)
html = u.read()
@@ -119,9 +117,7 @@ class BIM_Tutorial:
html = html.decode("utf8")
html = html.replace("\n", " ")
html = html.replace('href="/', 'href="https://wiki.freecad.org/')
html = re.sub(
'<div id="toc".*?</ul> </div>', "", html
) # remove table of contents
html = re.sub('<div id="toc".*?</ul> </div>', "", html) # remove table of contents
u.close()
except:
# unable to load tutorial. Look for offline version
@@ -195,9 +191,7 @@ class BIM_Tutorial:
u.close()
# descr = descr.replace(path,"file://"+storename.replace("\\","/"))
# fix for windows - seems to work everywhere else too...
descr = descr.replace(
path, "file:///" + storename.replace("\\", "/")
)
descr = descr.replace(path, "file:///" + storename.replace("\\", "/"))
nd.append(descr)
self.descriptions = nd
@@ -249,11 +243,7 @@ class BIM_Tutorial:
else:
self.form.labelTasks.hide()
self.dock.setWindowTitle(
translate("BIM", "BIM Tutorial - step")
+ " "
+ str(self.step)
+ " / "
+ str(self.steps)
translate("BIM", "BIM Tutorial - step") + " " + str(self.step) + " / " + str(self.steps)
)
self.form.progressBar.setValue(int((float(self.step) / self.steps) * 100))