Merge pull request #12 from makermelissa/main
Updated so checks are passing
This commit is contained in:
commit
264f4188e3
3 changed files with 16 additions and 8 deletions
|
|
@ -4,15 +4,15 @@
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/python/black
|
- repo: https://github.com/python/black
|
||||||
rev: 19.10b0
|
rev: 21.6b0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://github.com/fsfe/reuse-tool
|
- repo: https://github.com/fsfe/reuse-tool
|
||||||
rev: latest
|
rev: v0.12.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: reuse
|
- id: reuse
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v2.3.0
|
rev: v4.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,11 @@ class Shell:
|
||||||
|
|
||||||
for index, selection in enumerate(selections):
|
for index, selection in enumerate(selections):
|
||||||
options.append(
|
options.append(
|
||||||
{"selector": str(index + 1), "prompt": selection, "return": index + 1,}
|
{
|
||||||
|
"selector": str(index + 1),
|
||||||
|
"prompt": selection,
|
||||||
|
"return": index + 1,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
return prompt.options(message, options)
|
return prompt.options(message, options)
|
||||||
|
|
||||||
|
|
@ -66,9 +70,11 @@ class Shell:
|
||||||
original_stdout = sys.stdout
|
original_stdout = sys.stdout
|
||||||
original_stderr = sys.stderr
|
original_stderr = sys.stderr
|
||||||
try:
|
try:
|
||||||
|
# pylint: disable=consider-using-with
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||||
)
|
)
|
||||||
|
# pylint: enable=consider-using-with
|
||||||
full_output = ""
|
full_output = ""
|
||||||
while True:
|
while True:
|
||||||
output = proc.stdout.readline()
|
output = proc.stdout.readline()
|
||||||
|
|
@ -391,9 +397,8 @@ class Shell:
|
||||||
content = "\n" + content
|
content = "\n" + content
|
||||||
else:
|
else:
|
||||||
mode = "w"
|
mode = "w"
|
||||||
service_file = open(self.path(path), mode)
|
with open(self.path(path), mode) as service_file:
|
||||||
service_file.write(content)
|
service_file.write(content)
|
||||||
service_file.close()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_python3():
|
def is_python3():
|
||||||
|
|
|
||||||
5
setup.py
5
setup.py
|
|
@ -34,7 +34,10 @@ setup(
|
||||||
# Author details
|
# Author details
|
||||||
author="Adafruit Industries",
|
author="Adafruit Industries",
|
||||||
author_email="circuitpython@adafruit.com",
|
author_email="circuitpython@adafruit.com",
|
||||||
install_requires=["clint", "Adafruit-PlatformDetect",],
|
install_requires=[
|
||||||
|
"clint",
|
||||||
|
"Adafruit-PlatformDetect",
|
||||||
|
],
|
||||||
# Choose your license
|
# Choose your license
|
||||||
license="MIT",
|
license="MIT",
|
||||||
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue