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 excluded_urls #9

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

jimpriest
Copy link

Add ability to exclude a URL from being checked (regex) #7

jimpriest and others added 3 commits August 17, 2015 11:59
cleanup. bumped version
URLs matching the regular expression will be ignored
@@ -207,6 +214,9 @@ def _parse_config(self):
if self.options.ignored_prefixes:
self.ignored_prefixes = self.options.ignored_prefixes.split(',')

if self.options.excluded_urls:
self.excluded_urls = self.options.excluded_urls.split(',')
Copy link
Owner

Choose a reason for hiding this comment

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

slight optimization to prevent compiling the regex for every url:

self.excluded_urls = [re.compile(pattern) for pattern in self.options.excluded_urls.split(',')]

@bartdag
Copy link
Owner

bartdag commented Sep 2, 2015

Thanks for the pull request, just a small thing to fix and if you could add a test, that would be great.

To test, install nose (pip install nose) and run at the root of the project the following command: nosetests

* refactor from pull request comments to compile regex
* add exclude test
@maxdanilov
Copy link

@jimpriest @bartdag Any updates on this PR?

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.

3 participants