Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests for Python 3.7
name: Unit Tests for Python 3.13

on:
pull_request:
Expand All @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7]
python-version: ['3.13']

runs-on: ubuntu-latest

Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/python38.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12']
python-version: [3.9, '3.10', '3.11', '3.12']

runs-on: ubuntu-latest

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ Tools to handle Gerber and Excellon files in Python.
In the pipeline column output the status of a certain step in github actions workflow
| Version | Supported | Notes |
| ------- | ------------------ | -------- |
| 3.7.x | [![Python 3.7](https://github.com/MacroFab/pcb-tools/actions/workflows/python37.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python37.yaml) | End of Life |
| 3.8.x | [![Python 3.8](https://github.com/MacroFab/pcb-tools/actions/workflows/python38.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python38.yaml) | |
| 3.9.x | [![Python 3.9](https://github.com/MacroFab/pcb-tools/actions/workflows/python39.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python39.yaml) | |
| 3.10.x | [![Python 3.10](https://github.com/MacroFab/pcb-tools/actions/workflows/python310.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python310.yaml) | |
| 3.11.x | [![Python 3.11](https://github.com/MacroFab/pcb-tools/actions/workflows/python311.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python311.yaml) | |
| 3.12.x | [![Python 3.12](https://github.com/MacroFab/pcb-tools/actions/workflows/python312.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python312.yaml) | |
| 3.13.x | [![Python 3.13](https://github.com/MacroFab/pcb-tools/actions/workflows/python313.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python313.yaml) | |

Usage Example:
---------------
Expand Down
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