Skip to content

Allow empty strings in string_or_none contract #184

Description

@joshblum

What is the reasoning for checking if the string has a length in the string_or_none contract ? The name is confusing since passing an empty string results in an exception whereas None is allowed. Is there a reason for this? I would suggest changing the name to non_empty_string_or_none or removing the length restriction. Happy to add a PR depending on what is wanted! :) [My preference would be to make an empty string allowed, since it makes handling code to pass to the tracker simpler]

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions