Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
replace is not with !=
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckwagoncomputing committed Mar 17, 2023
1 parent c776a46 commit 728e4d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions gerber/excellon_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,10 @@ def from_excellon(cls, line, settings, **kwargs):
count = int(stmt['rcount'])
xdelta = (parse_gerber_value(stmt['xdelta'], settings.format,
settings.zero_suppression)
if stmt['xdelta'] is not '' else None)
if stmt['xdelta'] != '' else None)
ydelta = (parse_gerber_value(stmt['ydelta'], settings.format,
settings.zero_suppression)
if stmt['ydelta'] is not '' else None)
if stmt['ydelta'] != '' else None)
c = cls(count, xdelta, ydelta, **kwargs)
c.units = settings.units
return c
Expand Down Expand Up @@ -606,10 +606,10 @@ def from_excellon(cls, line, settings, **kwargs):
stmt = match.groupdict()
x = (parse_gerber_value(stmt['x'], settings.format,
settings.zero_suppression)
if stmt['x'] is not '' else None)
if stmt['x'] != '' else None)
y = (parse_gerber_value(stmt['y'], settings.format,
settings.zero_suppression)
if stmt['y'] is not '' else None)
if stmt['y'] != '' else None)
c = cls(x, y, **kwargs)
c.units = settings.units
return c
Expand Down
12 changes: 6 additions & 6 deletions gerber/ipc356.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ def from_line(cls, line, settings):
coord_strings = line.strip().split()[1:]
for coord in coord_strings:
coord_dict = _COORD.match(coord).groupdict()
x = int(coord_dict['x']) if coord_dict['x'] is not '' else x
y = int(coord_dict['y']) if coord_dict['y'] is not '' else y
x = int(coord_dict['x']) if coord_dict['x'] != '' else x
y = int(coord_dict['y']) if coord_dict['y'] != '' else y
points.append((x * scale, y * scale))
return cls(type, points)

Expand Down Expand Up @@ -412,9 +412,9 @@ def from_line(cls, line, settings):
x = 0
y = 0
x = int(aperture_dict['x']) * \
scale if aperture_dict['x'] is not '' else None
scale if aperture_dict['x'] != '' else None
y = int(aperture_dict['y']) * \
scale if aperture_dict['y'] is not '' else None
scale if aperture_dict['y'] != '' else None
aperture = (x, y)

# Parse out conductor shapes
Expand All @@ -428,8 +428,8 @@ def from_line(cls, line, settings):
coords = rshape.split()
for coord in coords:
coord_dict = _COORD.match(coord).groupdict()
x = int(coord_dict['x']) if coord_dict['x'] is not '' else x
y = int(coord_dict['y']) if coord_dict['y'] is not '' else y
x = int(coord_dict['x']) if coord_dict['x'] != '' else x
y = int(coord_dict['y']) if coord_dict['y'] != '' else y
shape.append((x * scale, y * scale))
shapes.append(tuple(shape))
return cls(net_name, layer, aperture, tuple(shapes))
Expand Down

0 comments on commit 728e4d5

Please sign in to comment.