Merge pull request #14 from makermelissa/main

Fix language setting in docs
This commit is contained in:
Alec Delaney 2022-05-31 15:55:48 -04:00 committed by GitHub
commit 758dbc0e8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 17 deletions

View file

@ -22,10 +22,10 @@ jobs:
awk -F '\/' '{ print tolower($2) }' | awk -F '\/' '{ print tolower($2) }' |
tr '_' '-' tr '_' '-'
) )
- name: Set up Python 3.6 - name: Set up Python 3.7
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
python-version: 3.6 python-version: 3.7
- name: Versions - name: Versions
run: | run: |
python3 --version python3 --version

View file

@ -4,7 +4,7 @@
repos: repos:
- repo: https://github.com/python/black - repo: https://github.com/python/black
rev: 21.6b0 rev: 22.3.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/fsfe/reuse-tool - repo: https://github.com/fsfe/reuse-tool

View file

@ -125,7 +125,7 @@ class Shell:
if message is None: if message is None:
self.error("Exiting due to error") self.error("Exiting due to error")
else: else:
self.error("Exiting due to error: {}".format(message)) self.error(f"Exiting due to error: {message}")
sys.exit(1) sys.exit(1)
def error(self, message): def error(self, message):
@ -257,9 +257,7 @@ class Shell:
Run the grep command and return the result Run the grep command and return the result
""" """
location = self.path(location) location = self.path(location)
return self.run_command( return self.run_command(f"grep {search_term} {location}", suppress_message=True)
"grep {} {}".format(search_term, location), suppress_message=True
)
@staticmethod @staticmethod
def date(): def date():
@ -385,7 +383,7 @@ class Shell:
""" """
if not self.is_root(): if not self.is_root():
print("Installer must be run as root.") print("Installer must be run as root.")
print("Try 'sudo python3 {}'".format(self.script())) print(f"Try 'sudo python3 {self.script()}'")
sys.exit(1) sys.exit(1)
def write_text_file(self, path, content, append=True): def write_text_file(self, path, content, append=True):
@ -516,7 +514,7 @@ class Shell:
def check_kernel_update_reboot_required(self): def check_kernel_update_reboot_required(self):
"""Checks if the pi needs to be rebooted since the last kernel update""" """Checks if the pi needs to be rebooted since the last kernel update"""
if not self.exists("/lib/modules/{}".format(self.release())): if not self.exists(f"/lib/modules/{self.release()}"):
self.error( self.error(
"OS has not been rebooted since last kernel update. " "OS has not been rebooted since last kernel update. "
"Please reboot and re-run the script." "Please reboot and re-run the script."

View file

@ -21,13 +21,6 @@ extensions = [
"sphinx.ext.todo", "sphinx.ext.todo",
] ]
# TODO: Please Read!
# Uncomment the below if you use native CircuitPython modules such as
# digitalio, micropython and busio. List the modules you use. Without it, the
# autodoc module docs will fail to generate with a warning.
# autodoc_mock_imports = ["digitalio", "busio"]
intersphinx_mapping = { intersphinx_mapping = {
"python": ("https://docs.python.org/3.4", None), "python": ("https://docs.python.org/3.4", None),
"CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
@ -60,7 +53,7 @@ release = "1.0"
# #
# This is also used if you do content translation via gettext catalogs. # This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases. # Usually you set "language" from the command line for these cases.
language = None language = "en"
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.