Closed mperrin closed 3 months ago
Hello @mperrin, Thank you for submitting the Pull Request !
webbpsf/tests/test_nirspec.py
:Line 10:1: E402 module level import not at top of file Line 13:1: E402 module level import not at top of file Line 15:1: E731 do not assign a lambda expression, use a def Line 20:1: E731 do not assign a lambda expression, use a def Line 21:1: E731 do not assign a lambda expression, use a def Line 23:1: E731 do not assign a lambda expression, use a def Line 69:1: E302 expected 2 blank lines, found 1
webbpsf/webbpsf_core.py
:Line 302:126: E501 line too long (148 > 125 characters) Line 389:47: E114 indentation is not a multiple of four (comment) Line 389:47: E116 unexpected indentation (comment) Line 728:126: E501 line too long (152 > 125 characters) Line 731:29: E201 whitespace after '(' Line 755:1: E266 too many leading '#' for block comment Line 979:126: E501 line too long (133 > 125 characters) Line 981:57: E225 missing whitespace around operator Line 985:126: E501 line too long (165 > 125 characters) Line 993:32: E201 whitespace after '(' Line 1005:126: E501 line too long (145 > 125 characters) Line 1024:126: E501 line too long (134 > 125 characters) Line 1042:82: E202 whitespace before ')' Line 1083:52: E225 missing whitespace around operator Line 1254:91: E231 missing whitespace after ',' Line 1254:126: E501 line too long (139 > 125 characters) Line 1441:126: E501 line too long (200 > 125 characters) Line 1597:126: E501 line too long (131 > 125 characters) Line 1840:13: E731 do not assign a lambda expression, use a def Line 1842:13: E731 do not assign a lambda expression, use a def Line 1852:126: E501 line too long (165 > 125 characters) Line 1875:9: E266 too many leading '#' for block comment Line 1908:9: E266 too many leading '#' for block comment Line 1909:9: E266 too many leading '#' for block comment Line 1949:1: E302 expected 2 blank lines, found 1 Line 1953:5: E303 too many blank lines (2) Line 1954:26: E201 whitespace after '(' Line 1968:5: E303 too many blank lines (2) Line 2026:126: E501 line too long (127 > 125 characters) Line 2051:126: E501 line too long (155 > 125 characters) Line 2071:17: E126 continuation line over-indented for hanging indent Line 2213:126: E501 line too long (141 > 125 characters) Line 2355:36: E225 missing whitespace around operator Line 2395:5: E303 too many blank lines (2) Line 2414:5: E303 too many blank lines (2) Line 2431:13: E265 block comment should start with '# ' Line 2434:13: E265 block comment should start with '# ' Line 2436:13: E265 block comment should start with '# ' Line 2437:13: E265 block comment should start with '# ' Line 2438:13: E265 block comment should start with '# ' Line 2439:9: E265 block comment should start with '# ' Line 2447:24: E225 missing whitespace around operator Line 2451:65: E226 missing whitespace around arithmetic operator Line 2608:126: E501 line too long (130 > 125 characters) Line 2652:126: E501 line too long (130 > 125 characters) Line 2662:126: E501 line too long (141 > 125 characters) Line 2686:126: E501 line too long (130 > 125 characters) Line 2712:31: E225 missing whitespace around operator Line 3101:33: E116 unexpected indentation (comment) Line 3132:33: E221 multiple spaces before operator Line 3202:71: E231 missing whitespace after ',' Line 3203:126: E501 line too long (145 > 125 characters) Line 3207:9: E303 too many blank lines (2) Line 3216:5: E303 too many blank lines (2) Line 3232:126: E501 line too long (139 > 125 characters) Line 3247:126: E501 line too long (145 > 125 characters) Line 3248:126: E501 line too long (137 > 125 characters) Line 3261:126: E501 line too long (142 > 125 characters) Line 3269:126: E501 line too long (134 > 125 characters) Line 3272:43: E261 at least two spaces before inline comment Line 3275:5: E303 too many blank lines (2) Line 3306:24: E225 missing whitespace around operator Line 3328:5: E303 too many blank lines (2)
If you have not done so, please lint your code in accordance with best practices.
@obi-wan76 apologies for keeping making yet more PRs, but this one at least is a tiny quick bug fix...
Minor fix: When switching to NIRSpec IFU mode, don't leave the image_mask at a slit or MSA mask (which is impossible to see with the IFU).
Specifically the default
image_mask
For NIRSpec is 'MSA all open', and settingnrs.mode = 'IFU'
would leavenrs.image_mask == 'MSA all open'
which makes no sense. This PR fixes that.It also deletes some very-very-old and obsolete warning checks about filter names starting with IFU and saying the IFU modes are not yet implemented; this is way out of date and no longer needed (and these lines of code were never getting executed anyway).