use autoflake to remove unused imports

This commit is contained in:
ducklet 2020-11-08 01:17:33 +01:00
parent b7a683c11d
commit 9d7d80d3a5
9 changed files with 19 additions and 20 deletions

View file

@ -1,4 +1,3 @@
import asyncio
import logging import logging
from dataclasses import dataclass, field from dataclasses import dataclass, field
from datetime import datetime, timezone from datetime import datetime, timezone

View file

@ -1,6 +1,6 @@
import logging import logging
import sqlite3 import sqlite3
from datetime import datetime, timezone from datetime import datetime
from typing import * from typing import *
from .models import Feed, Post from .models import Feed, Post

View file

@ -1,5 +1,4 @@
import random import random
import re
from ..functions import reply from ..functions import reply
from ..models import Message from ..models import Message

View file

@ -1,4 +1,3 @@
import re
from dataclasses import dataclass from dataclasses import dataclass
from html import escape from html import escape
from random import choice from random import choice

View file

@ -2,8 +2,6 @@ import codecs
import re import re
from dataclasses import dataclass from dataclasses import dataclass
from html import escape from html import escape
from html.parser import HTMLParser
from random import randint
from time import time as now from time import time as now
from typing import * from typing import *

View file

@ -1,11 +1,9 @@
import io import io
import json import json
import re import re
from dataclasses import dataclass, fields from dataclasses import dataclass
from dataclasses import replace as clone from dataclasses import replace as clone
from datetime import date from datetime import date
from html import escape
from html.parser import HTMLParser
from pathlib import Path from pathlib import Path
from typing import * from typing import *
from urllib.parse import urlparse from urllib.parse import urlparse

View file

@ -1,9 +1,8 @@
import asyncio import asyncio
import logging import logging
import re
from dataclasses import dataclass from dataclasses import dataclass
from datetime import datetime from datetime import datetime
from functools import lru_cache, partial from functools import lru_cache
from html import escape from html import escape
from time import time as now from time import time as now
from typing import * from typing import *

View file

@ -1,7 +1,6 @@
import re import re
from dataclasses import dataclass, fields from dataclasses import dataclass
from functools import lru_cache from functools import lru_cache
from html import escape
from time import time as now from time import time as now
from typing import * from typing import *

View file

@ -1,11 +1,19 @@
#!/bin/sh -e #!/bin/sh -e
if [ "$1" = '--fix' ]; then if [ "$1" = '--fix' ]; then
(
set -x set -x
black . black .
isort --profile black . isort --profile black .
else autoflake --in-place --recursive .
set -x )
black --check . exit
isort --profile black --check .
fi fi
error=0
(set -x; black --check .) || error=$?
(set -x; isort --profile black --check .) || error=$?
(set -x; autoflake --check --recursive .) || error=$?
exit "$error"