FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

pass `re.sub` flags as kwargs by sneakers-the-rat · Pull Request #189 · LibraryOfCongress/bagit-python · GitHub

pass re.sub flags as kwargs - #189

Open
sneakers-the-rat wants to merge 1 commit into
LibraryOfCongress:masterfrom
sneakers-the-rat:patch-1
Open

sneakers-the-rat wants to merge 1 commit into
LibraryOfCongress:masterfrom
sneakers-the-rat:patch-1

Conversation

Copy link
Copy Markdown

hello :)

making some bags in testing, getting a DeprecationWarning:

tests/test_validation.py: 81 warnings
  .venv/bin/bagit.py:1412: DeprecationWarning: 'count' is passed as positional argument
    s = re.sub(r"%0D", "\r", s, re.IGNORECASE)

tests/test_validation.py: 81 warnings
  .venv/bin/bagit.py:1413: DeprecationWarning: 'count' is passed as positional argument
    s = re.sub(r"%0A", "\n", s, re.IGNORECASE)

looks like the flags are being interpreted as count, and we're also being warned that we need to pass extra args as kwargs anyway, so fixed that :)

deprecationwarning: 'count' is passed as positional argument

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL