Skip to content

Accept path-like inputs in FileLinks - #15435

Merged
Carreau merged 2 commits into
ipython:mainfrom
Aurantium-47:fix/filelinks-pathlike
Oct 21, 2026
Merged

Carreau merged 2 commits into
ipython:mainfrom
Aurantium-47:fix/filelinks-pathlike

Conversation

@Aurantium-47

Copy link
Copy Markdown
Contributor

FileLinks(Path("reports")) raises AttributeError while stripping trailing slashes, although FileLink already accepts path-like inputs. Normalize the directory with the existing os.fsdecode import before applying the same slash handling.

Add coverage for Path and PurePath inputs with both recursive settings, checking the HTML and terminal representations against the existing string-path behavior.

🤖🤖 Prepared with OpenAI Codex assistance.

@Carreau
Carreau force-pushed the fix/filelinks-pathlike branch from 6da9a67 to 2f85774 Compare October 21, 2026 09:40
@Carreau Carreau added this to the 9.18 milestone Oct 21, 2026
@Carreau Carreau changed the title Accept path-like inputs in FileLinks 🤖🤖 Accept path-like inputs in FileLinks Oct 21, 2026
@Carreau
Carreau merged commit f0f9278 into ipython:main Oct 21, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants