Skip to content
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

add regex support #26

Merged
merged 7 commits into from
Feb 23, 2024
Merged

add regex support #26

merged 7 commits into from
Feb 23, 2024

Conversation

caelean
Copy link
Member

@caelean caelean commented Feb 23, 2024

  • update with regex support
  • updated tests
  • update docs

README.md Outdated
```python
@modguard.public(allowlist=['utils.helpers'])
@modguard.public(allowlist=['utils.helpers', r'.*aux.*'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be more readable to use a realistic example like r'core\.project\.*' or similar

README.md Outdated

```
This will allow for `public_function` and `PUBLIC_CONSTANT` to be imported and used in `utils.helpers`, but restrict its usage elsewhere.
This will allow for `public_function` and `PUBLIC_CONSTANT` to be imported and used in `utils.helpers` and any matching regex to `.*aux.*`, but restrict its usage elsewhere.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This will allow for `public_function` and `PUBLIC_CONSTANT` to be imported and used in `utils.helpers` and any matching regex to `.*aux.*`, but restrict its usage elsewhere.
This will allow for `public_function` and `PUBLIC_CONSTANT` to be imported and used in `utils.helpers` and any module whose path matches the regex `.*aux.*`, but restrict its usage elsewhere.

@emdoyle emdoyle merged commit 873b655 into main Feb 23, 2024
4 checks passed
@emdoyle emdoyle deleted the add-regex-support branch February 23, 2024 19:15
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