Skip to content

[Bug]: Invalid slice strings accepted by Section.from_string without warning/exception #78

@teald

Description

@teald

Contact Details

No response

What happened?

If an invalid string is passed to astrodata.utils.Section.from_string, such as in this test, it passes without at warning the user or throwing an exception.

The desired behavior is likely to have a warning, more likely an exception(?) since this is almost certainly a typo when it happens.

It may be a good idea to have it accept optional brackets if there's a user expectation that those are optional, but have unmatched brackets raise an error (as this should be considered user error).

Version

Development version, can be reproduced in all previous versions.

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtestRelated to testing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions