Skip to content

pass re.sub flags as kwargs #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sneakers-the-rat
Copy link

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
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