Commit 318f6e99 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Geometry: Fix pep8.

Showing with 17 additions and 17 deletions
+17 -17
...@@ -540,7 +540,7 @@ class GeometryWindow(PamhyrWindow): ...@@ -540,7 +540,7 @@ class GeometryWindow(PamhyrWindow):
QSettings.UserScope, 'MyOrg' QSettings.UserScope, 'MyOrg'
) )
if self._study.filename != "" or self._study.filename != None: if self._study.filename != "" or self._study.filename is not None:
default_directory = os.path.basename(self._study.filename) default_directory = os.path.basename(self._study.filename)
current_dir = settings.value( current_dir = settings.value(
'current_directory', 'current_directory',
...@@ -575,22 +575,22 @@ class GeometryWindow(PamhyrWindow): ...@@ -575,22 +575,22 @@ class GeometryWindow(PamhyrWindow):
pid += 1 pid += 1
def _export_to_file_st_profile(self, wfile, profile, pid): def _export_to_file_st_profile(self, wfile, profile, pid):
num = f"{pid:>6}" num = f"{pid:>6}"
c1 = f"{profile.code1:>6}" c1 = f"{profile.code1:>6}"
c2 = f"{profile.code2:>6}" c2 = f"{profile.code2:>6}"
t = f"{len(profile.points):>6}" t = f"{len(profile.points):>6}"
kp = f"{profile.kp:>12f}"[0:12] kp = f"{profile.kp:>12f}"[0:12]
pname = profile.name pname = profile.name
if profile.name == "": if profile.name == "":
pname = f"p{profile.id:>3}".replace(" ", "0") pname = f"p{profile.id:>3}".replace(" ", "0")
name = f"{pname:<19}" name = f"{pname:<19}"
wfile.write(f"{num}{c1}{c2}{t} {kp} {pname}\n") wfile.write(f"{num}{c1}{c2}{t} {kp} {pname}\n")
for point in profile.points: for point in profile.points:
self._export_to_file_st_point(wfile, point) self._export_to_file_st_point(wfile, point)
wfile.write(f" 999.9990 999.9990 999.9990\n") wfile.write(f" 999.9990 999.9990 999.9990\n")
def _export_to_file_st_point(self, wfile, point): def _export_to_file_st_point(self, wfile, point):
x = f"{point.x:<12.4f}"[0:12] x = f"{point.x:<12.4f}"[0:12]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment