Mariah33 opened a new pull request, #14711:
URL: https://github.com/apache/lucene/pull/14711

   ### Description
   
   This PR updates the usage of os.path.abspath to Path(...).resolve() in 
compliance with ruff rule PATH103. Other os.path elements are retained to scope 
the change narrowly and safely.
   
   ### Tested the change locally:
   ```
   version = "0.1.0"
   rcNum = 123
   rev = "2"
   dir = "lucene-%s-RC%d-rev-%s" % (version, rcNum, rev)
   localDir = "/some/local/dir"
   path_file = "file://%s/%s" % (Path(localDir).resolve(), dir)
   print(path_file)
   print(type(path_file))
   
   os_file =  "file://%s/%s" % (os.path.abspath(localDir), dir)
   print(os_file)
   print(type(os_file))
   assert path_file == os_file
   ```
   ### Results:
   ```
   file:///some/local/dir/lucene-0.1.0-RC123-rev-2
   <class 'str'>
   file:///some/local/dir/lucene-0.1.0-RC123-rev-2
   <class 'str'>
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to