Skip to content

Fix numbered download filenames#12

Open
ikejourney wants to merge 1 commit into
BuffettCode:masterfrom
ikejourney:fix-numbered-download-extension
Open

Fix numbered download filenames#12
ikejourney wants to merge 1 commit into
BuffettCode:masterfrom
ikejourney:fix-numbered-download-extension

Conversation

@ikejourney

Copy link
Copy Markdown

Summary

Fix numbered download filenames so the extension separator is preserved.

When download(..., is_override=True, is_numbering=True) needs to choose a new name for an existing file, the current implementation builds names like sample(1)xbrl. This changes the helper to use os.path.splitext(), producing sample(1).xbrl.

The regression test covers the numbered filename helper.

Tests

  • python3 -m py_compile edinet_xbrl/edinet_xbrl_downloader.py tests/edinet_xbrl_downloader_test.py
  • git diff --check

Could not run the target unittest locally because this environment is missing the package dependency requests.

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