flatten indentation where it makes sense
This commit is contained in:
parent
9d5b1ef5e6
commit
39d9b88fa4
10 changed files with 22 additions and 25 deletions
|
|
@ -220,11 +220,11 @@ def _read_block(block) -> tuple[str, Pattern]:
|
|||
|
||||
if points.shape[1] == 2:
|
||||
raise PatternError('Invalid or unimplemented polygon?')
|
||||
#shape = Polygon()
|
||||
elif points.shape[1] > 2:
|
||||
|
||||
if points.shape[1] > 2:
|
||||
if (points[0, 2] != points[:, 2]).any():
|
||||
raise PatternError('PolyLine has non-constant width (not yet representable in masque!)')
|
||||
elif points.shape[1] == 4 and (points[:, 3] != 0).any():
|
||||
if points.shape[1] == 4 and (points[:, 3] != 0).any():
|
||||
raise PatternError('LWPolyLine has bulge (not yet representable in masque!)')
|
||||
|
||||
width = points[0, 2]
|
||||
|
|
|
|||
|
|
@ -604,7 +604,7 @@ def load_libraryfile(
|
|||
else:
|
||||
gz_stream = gzip.open(path, mode='rb')
|
||||
stream = io.BufferedReader(gz_stream) # type: ignore
|
||||
else:
|
||||
else: # noqa: PLR5501
|
||||
if mmap:
|
||||
base_stream = open(path, mode='rb', buffering=0)
|
||||
stream = mmap.mmap(base_stream.fileno(), 0, access=mmap.ACCESS_READ) # type: ignore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue