fox-it / flow.record

Recordization library
GNU Affero General Public License v3.0
7 stars 9 forks source link

Improve the path field type #66

Closed pyrco closed 1 year ago

pyrco commented 1 year ago

The path class will now allow being instantiated using multiple path parts, making it behave more like its parent pathlib.PurePath class.

The inference on whether to return a windows_path or posix_path class instance is now done based on the first path part it encounters that is an instance of pathlib.PurePath.

For path parts that are a custom subclass of pathlib.PurePath (so not an instance of PureWindowsPath or PurePosixPath), the presence of a '\' as either separator or alternative separator will result in returning a windows_path class instance.

(DIS-1977)

codecov[bot] commented 1 year ago

Codecov Report

Merging #66 (3464d70) into main (1db1743) will increase coverage by 0.06%. The diff coverage is 100.00%.

:exclamation: Current head 3464d70 differs from pull request most recent head b555a1b. Consider uploading reports for the commit b555a1b to get more accurate results

@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
+ Coverage   78.67%   78.73%   +0.06%     
==========================================
  Files          32       32              
  Lines        2846     2855       +9     
==========================================
+ Hits         2239     2248       +9     
  Misses        607      607              
Flag Coverage Δ
unittests 78.73% <100.00%> (+0.06%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
flow/record/fieldtypes/__init__.py 91.22% <100.00%> (+0.20%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more