ahawker / ulid

Universally Unique Lexicographically Sortable Identifier (ULID) in Python 3
Apache License 2.0
695 stars 42 forks source link

Add 'parse' to public API #314

Closed ahawker closed 5 years ago

ahawker commented 5 years ago

Status: WIP

If merged, this PR fixes #313.

The 'from_value' method should take a value of any supported type and make a best guess attempt to convert it to a ULID instance.

Callers should only use this method when they're confident that they've received a value that can be represented as a ULID but are unsure what format/type it is in.

Callers should use the other from_* methods when the type/format is known.

codecov[bot] commented 5 years ago

Codecov Report

Merging #314 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #314   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         267    291   +24     
  Branches       58     68   +10     
=====================================
+ Hits          267    291   +24
Impacted Files Coverage Δ
ulid/api.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 81073c5...44b0499. Read the comment docs.