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 cloudflare to targets #79

Merged
merged 3 commits into from
May 7, 2024
Merged

Add cloudflare to targets #79

merged 3 commits into from
May 7, 2024

Conversation

willk
Copy link
Contributor

@willk willk commented May 7, 2024

  • Fixed Azure class. There was a problem with spacing
  • Added cloudflare as a class using cloudflare's unauthenticated API call
  • Updated README.md

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @willk - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +1 to +10
import requests
from sephiroth.providers.base_provider import BaseProvider


class Cloudflare(BaseProvider):
def __init__(self, excludeip6=False):
self.source_ranges = self._get_ranges()
self.processed_ranges = self._process_ranges(excludeip6)

def _get_ranges(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (testing): Missing tests for the new Cloudflare class.

The PR introduces a new Cloudflare class with methods _get_ranges and _process_ranges. It's crucial to add unit tests to verify that these methods behave as expected, especially since they involve external API calls and data processing.

@0xdade 0xdade merged commit 16de0df into 0xdade:main May 7, 2024
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