A SyntaxWarning in downstream code led me here due to the \ in labels.py. I changed those to raw strings - I believe this was the intention, as the desire would be for LaTeX to see backslash-space.
I did not remove unused imports as I was unsure if code was using the imports indirectly. I added __all__ to __init__.py such that these classes/functions are seen as top-level exports of openpmd-beamphysics and not reported as lint.
I addressed most of these:
pmd_beamphysics/fields/analysis.py:125:5: F841 Local variable `zmin` is assigned to but never used
pmd_beamphysics/fields/expansion.py:54:5: F841 Local variable `ooc2` is assigned to but never used
pmd_beamphysics/fields/fieldmesh.py:26:8: F811 [*] Redefinition of unused `functools` from line 20
pmd_beamphysics/fields/fieldmesh.py:449:30: F541 [*] f-string without any placeholders
pmd_beamphysics/interfaces/astra.py:261:5: F841 Local variable `dat` is assigned to but never used
pmd_beamphysics/interfaces/bmad.py:153:5: F841 Local variable `zeros` is assigned to but never used
pmd_beamphysics/interfaces/gpt.py:81:5: F841 Local variable `result` is assigned to but never used
pmd_beamphysics/interfaces/impact.py:7:1: E402 Module level import not at top of file
pmd_beamphysics/interfaces/impact.py:630:5: F841 Local variable `zmin` is assigned to but never used
pmd_beamphysics/interfaces/impact.py:630:11: F841 Local variable `zmax` is assigned to but never used
pmd_beamphysics/interfaces/impact.py:831:16: F821 Undefined name `os`
pmd_beamphysics/interfaces/impact.py:833:20: F821 Undefined name `os`
pmd_beamphysics/interfaces/lucretia.py:181:27: E711 Comparison to `None` should be `cond is None`
pmd_beamphysics/interfaces/simion.py:77:5: F841 Local variable `simion_units` is assigned to but never used
pmd_beamphysics/interfaces/superfish.py:4:1: E402 Module level import not at top of file
pmd_beamphysics/interfaces/superfish.py:296:9: F841 Local variable `rmin` is assigned to but never used
pmd_beamphysics/labels.py:169:9: E741 Ambiguous variable name: `l`
pmd_beamphysics/particles.py:1161:5: F841 Local variable `n` is assigned to but never used
pmd_beamphysics/plot.py:22:1: E402 Module level import not at top of file
pmd_beamphysics/units.py:18:1: E402 Module level import not at top of file
pmd_beamphysics/writers.py:76:9: F841 Local variable `g2` is assigned to but never used
pmd_beamphysics/writers.py:121:9: F841 Local variable `g2` is assigned to but never used
pmd_beamphysics/writers.py:124:42: F811 Redefinition of unused `unit` from line 3
This is a small maintenance/lint fixing PR.
SyntaxWarning
in downstream code led me here due to the\
inlabels.py
. I changed those to raw strings - I believe this was the intention, as the desire would be for LaTeX to see backslash-space.__all__
to__init__.py
such that these classes/functions are seen as top-level exports of openpmd-beamphysics and not reported as lint.