general: remove all found white-spaces

Also this change adds new line at the end for some scripts
This commit is contained in:
SecondThundeR 2021-09-19 15:49:44 +03:00
parent aacbc2f29d
commit ffe38c879a
7 changed files with 13 additions and 15 deletions

View File

@ -1,8 +1,7 @@
# Contributing to archinstall # Contributing to archinstall
Any contributions through pull requests are welcome as this project aims to be a community based project to ease some Arch Linux installation steps. Any contributions through pull requests are welcome as this project aims to be a community based project to ease some Arch Linux installation steps.
Bear in mind that in the future this repo might be transferred to the official [GitLab repo under Arch Linux](http://gitlab.archlinux.org/archlinux/) Bear in mind that in the future this repo might be transferred to the official [GitLab repo under Arch Linux](http://gitlab.archlinux.org/archlinux/) *(if GitLab becomes open to the general public)*.
*(if GitLab becomes open to the general public)*.
Therefore, guidelines and style changes to the code might come into effect as well as guidelines surrounding bug reporting and discussions. Therefore, guidelines and style changes to the code might come into effect as well as guidelines surrounding bug reporting and discussions.

View File

@ -106,7 +106,6 @@ with archinstall.Installer('/mnt') as installation:
installation.user_create('devel', 'devel') installation.user_create('devel', 'devel')
installation.user_set_pw('root', 'airoot') installation.user_set_pw('root', 'airoot')
``` ```
This installer will perform the following: This installer will perform the following:

View File

@ -1069,4 +1069,4 @@ def find_partition_by_mountpoint(block_devices, relative_mountpoint :str):
for device in block_devices: for device in block_devices:
for partition in block_devices[device]['partitions']: for partition in block_devices[device]['partitions']:
if partition.get('mountpoint', None) == relative_mountpoint: if partition.get('mountpoint', None) == relative_mountpoint:
return partition return partition

View File

@ -98,4 +98,4 @@ def load_plugin(path :str): # -> module (not sure how to write that in type defi
log(err, level=logging.ERROR) log(err, level=logging.ERROR)
log(f"The above error was detected when initiating the plugin: {path}", fg="red", level=logging.ERROR) log(f"The above error was detected when initiating the plugin: {path}", fg="red", level=logging.ERROR)
else: else:
log(f"Plugin '{path}' is missing a valid entry-point or is corrupt.", fg="yellow", level=logging.WARNING) log(f"Plugin '{path}' is missing a valid entry-point or is corrupt.", fg="yellow", level=logging.WARNING)

View File

@ -575,14 +575,14 @@ def manage_new_and_existing_partitions(block_device :BlockDevice) -> dict:
# log(f"Selecting which partitions to re-use on {block_device}...", fg="yellow", level=logging.INFO) # log(f"Selecting which partitions to re-use on {block_device}...", fg="yellow", level=logging.INFO)
# partitions = generic_multi_select(block_device.partitions.values(), "Select which partitions to re-use (the rest will be left alone): ", sort=True) # partitions = generic_multi_select(block_device.partitions.values(), "Select which partitions to re-use (the rest will be left alone): ", sort=True)
# partitions_to_wipe = generic_multi_select(partitions, "Which partitions do you wish to wipe (multiple can be selected): ", sort=True) # partitions_to_wipe = generic_multi_select(partitions, "Which partitions do you wish to wipe (multiple can be selected): ", sort=True)
# mountpoints = {} # mountpoints = {}
# struct = { # struct = {
# "partitions" : [] # "partitions" : []
# } # }
# for partition in partitions: # for partition in partitions:
# mountpoint = input(f"Select a mountpoint (or skip) for {partition}: ").strip() # mountpoint = input(f"Select a mountpoint (or skip) for {partition}: ").strip()
# part_struct = {} # part_struct = {}
# if mountpoint: # if mountpoint:
# part_struct['mountpoint'] = mountpoint # part_struct['mountpoint'] = mountpoint
@ -590,7 +590,7 @@ def manage_new_and_existing_partitions(block_device :BlockDevice) -> dict:
# part_struct['boot'] = True # part_struct['boot'] = True
# if has_uefi(): # if has_uefi():
# part_struct['ESP'] = True # part_struct['ESP'] = True
# elif mountpoint == '/' and # elif mountpoint == '/' and
# if partition.uuid: # if partition.uuid:
# part_struct['PARTUUID'] = partition.uuid # part_struct['PARTUUID'] = partition.uuid
# if partition in partitions_to_wipe: # if partition in partitions_to_wipe:
@ -632,15 +632,15 @@ def manage_new_and_existing_partitions(block_device :BlockDevice) -> dict:
if not task: if not task:
break break
if task == 'Create a new partition': if task == 'Create a new partition':
if partition_type == 'gpt': if partition_type == 'gpt':
# https://www.gnu.org/software/parted/manual/html_node/mkpart.html # https://www.gnu.org/software/parted/manual/html_node/mkpart.html
# https://www.gnu.org/software/parted/manual/html_node/mklabel.html # https://www.gnu.org/software/parted/manual/html_node/mklabel.html
name = input("Enter a desired name for the partition: ").strip() name = input("Enter a desired name for the partition: ").strip()
fstype = input("Enter a desired filesystem type for the partition: ").strip() fstype = input("Enter a desired filesystem type for the partition: ").strip()
start = input(f"Enter the start sector (percentage or block number, default: {block_device.largest_free_space[0]}): ").strip() start = input(f"Enter the start sector (percentage or block number, default: {block_device.largest_free_space[0]}): ").strip()
if not start.strip(): if not start.strip():
start = block_device.largest_free_space[0] start = block_device.largest_free_space[0]
@ -750,7 +750,7 @@ def select_individual_blockdevice_usage(block_devices :list):
for device in block_devices: for device in block_devices:
layout = manage_new_and_existing_partitions(device) layout = manage_new_and_existing_partitions(device)
result[device.path] = layout result[device.path] = layout
return result return result

View File

@ -66,7 +66,7 @@ def load_config():
archinstall.storage['disk_layouts'] = json.loads(archinstall.arguments['disk_layouts']) archinstall.storage['disk_layouts'] = json.loads(archinstall.arguments['disk_layouts'])
except: except:
raise ValueError("--disk_layouts=<json> needs either a JSON file or a JSON string given with a valid disk layout.") raise ValueError("--disk_layouts=<json> needs either a JSON file or a JSON string given with a valid disk layout.")
def ask_user_questions(): def ask_user_questions():
""" """
First, we'll ask the user for a bunch of user input. First, we'll ask the user for a bunch of user input.
@ -371,4 +371,4 @@ if not archinstall.arguments.get('silent'):
ask_user_questions() ask_user_questions()
perform_filesystem_operations() perform_filesystem_operations()
perform_installation(archinstall.storage.get('MOUNT_POINT', '/mnt')) perform_installation(archinstall.storage.get('MOUNT_POINT', '/mnt'))

View File

@ -29,7 +29,7 @@ include =
archinstall.* archinstall.*
[options.package_data] [options.package_data]
archinstall = archinstall =
examples/*.py examples/*.py
profiles/*.py profiles/*.py
profiles/applications/*.py profiles/applications/*.py