mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Include python in scripts directory in lint & formatting
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
SOURCES=$(find *.py octodns tests -name "*.py")
|
SOURCES="$(find *.py octodns tests -name '*.py') $(grep --files-with-matches '^#!.*python' script/*)"
|
||||||
|
|
||||||
. env/bin/activate
|
. env/bin/activate
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ if [ ! -f "$ACTIVATE" ]; then
|
|||||||
fi
|
fi
|
||||||
. "$ACTIVATE"
|
. "$ACTIVATE"
|
||||||
|
|
||||||
SOURCES="*.py octodns/*.py octodns/*/*.py tests/*.py"
|
SOURCES="$(find *.py octodns tests -name '*.py') $(grep --files-with-matches '^#!.*python' script/*)"
|
||||||
|
|
||||||
pyflakes $SOURCES
|
pyflakes $SOURCES
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import re
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from subprocess import check_call, check_output
|
from subprocess import check_call, check_output
|
||||||
from sys import argv
|
from sys import argv
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
def print_packages(packages, heading):
|
def print_packages(packages, heading):
|
||||||
@@ -38,8 +38,9 @@ with TemporaryDirectory() as tmpdir:
|
|||||||
# pip installs the module itself along with deps so we need to get that out of
|
# pip installs the module itself along with deps so we need to get that out of
|
||||||
# our list by finding the thing that was file installed during dev
|
# our list by finding the thing that was file installed during dev
|
||||||
frozen = sorted([p for p in frozen if not p.startswith(our_package_name)])
|
frozen = sorted([p for p in frozen if not p.startswith(our_package_name)])
|
||||||
dev_frozen = sorted([p for p in dev_frozen
|
dev_frozen = sorted(
|
||||||
if not p.startswith(our_package_name)])
|
[p for p in dev_frozen if not p.startswith(our_package_name)]
|
||||||
|
)
|
||||||
|
|
||||||
print_packages(frozen, 'frozen')
|
print_packages(frozen, 'frozen')
|
||||||
print_packages(dev_frozen, 'dev_frozen')
|
print_packages(dev_frozen, 'dev_frozen')
|
||||||
|
|||||||
Reference in New Issue
Block a user