style: Format code with black and isort

This commit is contained in:
deepsource-autofix[bot] 2023-08-08 19:48:37 +00:00 committed by GitHub
parent 6cb1fabcac
commit 63ba1be87d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View File

@ -2,10 +2,11 @@
# python -m src.__main__ # python -m src.__main__
# python -m src # also works because __main__ is the default module # python -m src # also works because __main__ is the default module
import argparse import argparse
import asyncio
import os import os
from pathlib import Path from pathlib import Path
from sys import exit, stderr from sys import exit, stderr
import asyncio
import dotenv import dotenv
from loguru import logger from loguru import logger

View File

@ -1,8 +1,10 @@
# This is a scriprt to undo the changes made by adblock-zerotrust.py # This is a scriprt to undo the changes made by adblock-zerotrust.py
import requests
import httpx
import asyncio import asyncio
import httpx
import requests
from . import utils from . import utils

View File

@ -1,8 +1,8 @@
import asyncio
import pathlib import pathlib
import requests
import asyncio
import httpx import httpx
import requests
from . import utils from . import utils
@ -52,9 +52,7 @@ async def upload_to_cloudflare(lists, account_id: str, token: str) -> None:
async with httpx.AsyncClient() as client: async with httpx.AsyncClient() as client:
for i, lst in enumerate(lists): for i, lst in enumerate(lists):
list_name = f"adblock-list-{i + 1}" list_name = f"adblock-list-{i + 1}"
url = ( url = f"https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/lists"
f"https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/lists"
)
headers = { headers = {
"Authorization": f"Bearer {token}", "Authorization": f"Bearer {token}",
"Content-Type": "application/json", "Content-Type": "application/json",
@ -79,7 +77,6 @@ async def upload_to_cloudflare(lists, account_id: str, token: str) -> None:
exit(1) exit(1)
def create_dns_policy(lists, account_id: str, token: str) -> None: def create_dns_policy(lists, account_id: str, token: str) -> None:
url = f"https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules" url = f"https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rules"
headers = { headers = {