some minor updates for linting and formatting
This commit is contained in:
parent
2b31b91237
commit
f52073d117
@ -64,9 +64,7 @@ EventDictT = Dict[int, EventEntry]
|
|||||||
|
|
||||||
|
|
||||||
class EventParser(FileParser):
|
class EventParser(FileParser):
|
||||||
def __init__(
|
def __init__(self, file_list: List[Path], interface_list, moving_window_size: int = 7):
|
||||||
self, file_list: List[Path], interface_list, moving_window_size: int = 7
|
|
||||||
):
|
|
||||||
super().__init__(file_list)
|
super().__init__(file_list)
|
||||||
self.set_moving_window_mode(moving_window_size)
|
self.set_moving_window_mode(moving_window_size)
|
||||||
self.interfaces = interface_list
|
self.interfaces = interface_list
|
||||||
@ -98,9 +96,7 @@ class EventParser(FileParser):
|
|||||||
# For now, it is assumed that there is only going to be one subsystem ID per
|
# For now, it is assumed that there is only going to be one subsystem ID per
|
||||||
# class / source file
|
# class / source file
|
||||||
try:
|
try:
|
||||||
self.current_id = self.interfaces[
|
self.current_id = self.interfaces[subsystem_id_assignment_match.group(1)][0]
|
||||||
subsystem_id_assignment_match.group(1)
|
|
||||||
][0]
|
|
||||||
self.my_id = self.return_number_from_string(self.current_id)
|
self.my_id = self.return_number_from_string(self.current_id)
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
print(f"Key not found: {e}")
|
print(f"Key not found: {e}")
|
||||||
@ -179,9 +175,7 @@ class EventParser(FileParser):
|
|||||||
f"Name: {self.mib_table.get(full_id).name}| "
|
f"Name: {self.mib_table.get(full_id).name}| "
|
||||||
f"Description: {self.mib_table.get(full_id).description}"
|
f"Description: {self.mib_table.get(full_id).description}"
|
||||||
)
|
)
|
||||||
self.mib_table.update(
|
self.mib_table.update({full_id: EventEntry(name, severity, description, file_name)})
|
||||||
{full_id: EventEntry(name, severity, description, file_name)}
|
|
||||||
)
|
|
||||||
self.count = self.count + 1
|
self.count = self.count + 1
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -193,15 +187,11 @@ class EventParser(FileParser):
|
|||||||
r"MAKE_EVENT\((0x[0-9a-fA-F]+|[0-9]{1,3}),[\s]*severity::([A-Z]*)\)[\s]*;"
|
r"MAKE_EVENT\((0x[0-9a-fA-F]+|[0-9]{1,3}),[\s]*severity::([A-Z]*)\)[\s]*;"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
regex_string = (
|
regex_string = r"static const(?:expr)? Event\s*([\w]+)\s*=\s*event::makeEvent\(([\w:]+),\s*(0x[0-9a-fA-F]+|[0-9]{1,3})\s*,\s*severity::([A-Z]+)\)\s*;"
|
||||||
r"static const(?:expr)? Event\s*([\w]+)\s*=\s*event::makeEvent\(([\w:]+),\s*(0x[0-9a-fA-F]+|[0-9]{1,3})\s*,\s*severity::([A-Z]+)\)\s*;"
|
|
||||||
)
|
|
||||||
event_full_match = re.search(regex_string, full_string)
|
event_full_match = re.search(regex_string, full_string)
|
||||||
return event_full_match
|
return event_full_match
|
||||||
|
|
||||||
def __build_multi_line_event_string(
|
def __build_multi_line_event_string(self, first_line: str, moving_window: List[str]) -> str:
|
||||||
self, first_line: str, moving_window: List[str]
|
|
||||||
) -> str:
|
|
||||||
return self._build_multi_line_string_generic(
|
return self._build_multi_line_string_generic(
|
||||||
first_line=first_line, moving_window=moving_window
|
first_line=first_line, moving_window=moving_window
|
||||||
)
|
)
|
||||||
|
@ -70,11 +70,11 @@ def write_translation_file(filename: str, list_of_entries, date_string_full: str
|
|||||||
def write_translation_header_file(filename: str = "translateObjects.h"):
|
def write_translation_header_file(filename: str = "translateObjects.h"):
|
||||||
file = open(filename, "w")
|
file = open(filename, "w")
|
||||||
file.write(
|
file.write(
|
||||||
f"#ifndef FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_\n"
|
"#ifndef FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_\n"
|
||||||
f"#define FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_\n\n"
|
"#define FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_\n\n"
|
||||||
f"#include <fsfw/objectmanager/SystemObjectIF.h>\n\n"
|
"#include <fsfw/objectmanager/SystemObjectIF.h>\n\n"
|
||||||
f"const char *translateObject(object_id_t object);\n\n"
|
"const char *translateObject(object_id_t object);\n\n"
|
||||||
f"#endif /* FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */\n"
|
"#endif /* FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"""Generic File Parser class
|
"""Generic File Parser class
|
||||||
Used by parse header files. Implemented as class in case header parser becomes more complex
|
Used by parse header files. Implemented as class in case header parser becomes more complex
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union, List
|
from typing import Union, List
|
||||||
@ -42,9 +43,7 @@ class FileListParser:
|
|||||||
"""
|
"""
|
||||||
print(printout_string, end="")
|
print(printout_string, end="")
|
||||||
for directory in self.directory_list:
|
for directory in self.directory_list:
|
||||||
self.__get_header_file_list(
|
self.__get_header_file_list(directory, search_recursively, print_current_dir)
|
||||||
directory, search_recursively, print_current_dir
|
|
||||||
)
|
|
||||||
print(str(len(self.header_files)) + " header files were found.")
|
print(str(len(self.header_files)) + " header files were found.")
|
||||||
# g.PP.pprint(self.header_files)
|
# g.PP.pprint(self.header_files)
|
||||||
return self.header_files
|
return self.header_files
|
||||||
@ -59,11 +58,7 @@ class FileListParser:
|
|||||||
if print_current_dir:
|
if print_current_dir:
|
||||||
print(f"Parsing header files in: {base_directory}")
|
print(f"Parsing header files in: {base_directory}")
|
||||||
for entry in base_directory.iterdir():
|
for entry in base_directory.iterdir():
|
||||||
if (
|
if entry.is_file() and entry.suffix == ".h" and entry.as_posix()[0] not in [".", "_"]:
|
||||||
entry.is_file()
|
|
||||||
and entry.suffix == ".h"
|
|
||||||
and entry.as_posix()[0] not in [".", "_"]
|
|
||||||
):
|
|
||||||
local_header_files.append(entry)
|
local_header_files.append(entry)
|
||||||
if seach_recursively:
|
if seach_recursively:
|
||||||
if entry.is_dir():
|
if entry.is_dir():
|
||||||
|
@ -11,6 +11,7 @@ Child classes fill out the MIB table (self.mib_table)
|
|||||||
@author R. Mueller
|
@author R. Mueller
|
||||||
@date 14.11.2019
|
@date 14.11.2019
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import enum
|
import enum
|
||||||
import re
|
import re
|
||||||
@ -108,7 +109,7 @@ class FileParser:
|
|||||||
:return: Returns the mib table dictionary.
|
:return: Returns the mib table dictionary.
|
||||||
"""
|
"""
|
||||||
if self.file_list_empty:
|
if self.file_list_empty:
|
||||||
print(f"Nothing to parse, supplied file list is empty!")
|
print("Nothing to parse, supplied file list is empty!")
|
||||||
return self.mib_table
|
return self.mib_table
|
||||||
|
|
||||||
if self.__parser_mode == FileParserModes.REGULAR:
|
if self.__parser_mode == FileParserModes.REGULAR:
|
||||||
@ -173,10 +174,7 @@ class FileParser:
|
|||||||
return
|
return
|
||||||
moving_window = [""] * moving_window_size
|
moving_window = [""] * moving_window_size
|
||||||
for line_idx, line in enumerate(all_lines):
|
for line_idx, line in enumerate(all_lines):
|
||||||
if (
|
if self.__debug_moving_window and self.__debug_moving_window_filename in file_name:
|
||||||
self.__debug_moving_window
|
|
||||||
and self.__debug_moving_window_filename in file_name
|
|
||||||
):
|
|
||||||
print(f"Moving window pre line anaylsis line {line_idx}")
|
print(f"Moving window pre line anaylsis line {line_idx}")
|
||||||
print(moving_window)
|
print(moving_window)
|
||||||
# The moving window will start with only the bottom being in the file
|
# The moving window will start with only the bottom being in the file
|
||||||
@ -194,10 +192,7 @@ class FileParser:
|
|||||||
for idx in range(moving_window_size - 1):
|
for idx in range(moving_window_size - 1):
|
||||||
moving_window[idx] = moving_window[idx + 1]
|
moving_window[idx] = moving_window[idx + 1]
|
||||||
moving_window[moving_window_size - 1] = line
|
moving_window[moving_window_size - 1] = line
|
||||||
if (
|
if self.__debug_moving_window and self.__debug_moving_window_filename in file_name:
|
||||||
self.__debug_moving_window
|
|
||||||
and self.__debug_moving_window_filename in file_name
|
|
||||||
):
|
|
||||||
print(f"Moving window post line analysis line {line_idx}")
|
print(f"Moving window post line analysis line {line_idx}")
|
||||||
print(moving_window)
|
print(moving_window)
|
||||||
self._handle_file_parsing_moving_window(
|
self._handle_file_parsing_moving_window(
|
||||||
@ -206,22 +201,16 @@ class FileParser:
|
|||||||
# Now the moving window moved past the end of the file. Sections which are outside
|
# Now the moving window moved past the end of the file. Sections which are outside
|
||||||
# the file are assigned an empty string until the window has moved out of file completely
|
# the file are assigned an empty string until the window has moved out of file completely
|
||||||
for remaining_windows_idx in range(moving_window_size):
|
for remaining_windows_idx in range(moving_window_size):
|
||||||
if (
|
if self.__debug_moving_window and self.__debug_moving_window_filename in file_name:
|
||||||
self.__debug_moving_window
|
print("Moving window pre line analysis post EOF")
|
||||||
and self.__debug_moving_window_filename in file_name
|
|
||||||
):
|
|
||||||
print(f"Moving window pre line analysis post EOF")
|
|
||||||
print(moving_window)
|
print(moving_window)
|
||||||
num_entries_to_clear = remaining_windows_idx + 1
|
num_entries_to_clear = remaining_windows_idx + 1
|
||||||
for idx_to_clear in range(num_entries_to_clear):
|
for idx_to_clear in range(num_entries_to_clear):
|
||||||
moving_window[moving_window_size - 1 - idx_to_clear] = ""
|
moving_window[moving_window_size - 1 - idx_to_clear] = ""
|
||||||
for idx_to_reassign in range(moving_window_size - 1 - num_entries_to_clear):
|
for idx_to_reassign in range(moving_window_size - 1 - num_entries_to_clear):
|
||||||
moving_window[idx_to_reassign] = moving_window[idx_to_reassign + 1]
|
moving_window[idx_to_reassign] = moving_window[idx_to_reassign + 1]
|
||||||
if (
|
if self.__debug_moving_window and self.__debug_moving_window_filename in file_name:
|
||||||
self.__debug_moving_window
|
print("Moving window post line analysis post EOF")
|
||||||
and self.__debug_moving_window_filename in file_name
|
|
||||||
):
|
|
||||||
print(f"Moving window post line analysis post EOF")
|
|
||||||
print(moving_window)
|
print(moving_window)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -241,9 +230,7 @@ class FileParser:
|
|||||||
all_lines = file.readlines()
|
all_lines = file.readlines()
|
||||||
return all_lines
|
return all_lines
|
||||||
|
|
||||||
def _build_multi_line_string_generic(
|
def _build_multi_line_string_generic(self, first_line: str, moving_window: List[str]) -> str:
|
||||||
self, first_line: str, moving_window: List[str]
|
|
||||||
) -> str:
|
|
||||||
"""This function transforms a multi line match into a one line match by searching for the
|
"""This function transforms a multi line match into a one line match by searching for the
|
||||||
semicolon at the string end"""
|
semicolon at the string end"""
|
||||||
all_lines = first_line.rstrip()
|
all_lines = first_line.rstrip()
|
||||||
@ -265,16 +252,12 @@ class FileParser:
|
|||||||
) -> List[MetaInfo]:
|
) -> List[MetaInfo]:
|
||||||
current_idx = self._moving_window_center_idx - 1
|
current_idx = self._moving_window_center_idx - 1
|
||||||
# Look at the line above first
|
# Look at the line above first
|
||||||
export_match = re.search(
|
export_match = re.search(r"\[EXPORT]\s*:\s*\[(\w*)]", moving_window[current_idx])
|
||||||
r"\[EXPORT]\s*:\s*\[(\w*)]", moving_window[current_idx]
|
|
||||||
)
|
|
||||||
if not export_match:
|
if not export_match:
|
||||||
while True:
|
while True:
|
||||||
if re.search(break_pattern, moving_window[current_idx]):
|
if re.search(break_pattern, moving_window[current_idx]):
|
||||||
break
|
break
|
||||||
export_match = re.search(
|
export_match = re.search(r"\[EXPORT]\s*:\s*\[(\w*)]", moving_window[current_idx])
|
||||||
r"\[EXPORT]\s*:\s*\[(\w*)]", moving_window[current_idx]
|
|
||||||
)
|
|
||||||
if export_match or current_idx <= 0:
|
if export_match or current_idx <= 0:
|
||||||
break
|
break
|
||||||
current_idx -= 1
|
current_idx -= 1
|
||||||
@ -289,9 +272,7 @@ class FileParser:
|
|||||||
string_to_add = string_to_add.rstrip()
|
string_to_add = string_to_add.rstrip()
|
||||||
descrip_string += string_to_add
|
descrip_string += string_to_add
|
||||||
current_build_idx += 1
|
current_build_idx += 1
|
||||||
resulting_description = re.search(
|
resulting_description = re.search(r"\[EXPORT]\s*:\s*\[\w*]\s(.*)", descrip_string)
|
||||||
r"\[EXPORT]\s*:\s*\[\w*]\s(.*)", descrip_string
|
|
||||||
)
|
|
||||||
if resulting_description:
|
if resulting_description:
|
||||||
info.value = resulting_description.group(1)
|
info.value = resulting_description.group(1)
|
||||||
|
|
||||||
|
@ -110,18 +110,14 @@ class InterfaceParser(FileParser):
|
|||||||
current_file_table.update({count: [match.group(1), short_name]})
|
current_file_table.update({count: [match.group(1), short_name]})
|
||||||
if not start_matched:
|
if not start_matched:
|
||||||
print("No start match detected when parsing interface files..")
|
print("No start match detected when parsing interface files..")
|
||||||
print(
|
print(f"Current file: {file_name} | Make sure to include a start definition")
|
||||||
f"Current file: {file_name} | Make sure to include a start definition"
|
|
||||||
)
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if not end_matched:
|
if not end_matched:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"No end match detected when parsing interface file {file_name}. "
|
f"No end match detected when parsing interface file {file_name}. "
|
||||||
f"Make sure to use [EXPORT] : [END]"
|
f"Make sure to use [EXPORT] : [END]"
|
||||||
)
|
)
|
||||||
file_conn_entry.sh = FileStartHelper(
|
file_conn_entry.sh = FileStartHelper(start_name, first_entry_name_or_index, count, None)
|
||||||
start_name, first_entry_name_or_index, count, None
|
|
||||||
)
|
|
||||||
if self.file_conn_helpers is None:
|
if self.file_conn_helpers is None:
|
||||||
self.file_conn_helpers = []
|
self.file_conn_helpers = []
|
||||||
self.file_conn_helpers.append(file_conn_entry)
|
self.file_conn_helpers.append(file_conn_entry)
|
||||||
@ -164,16 +160,12 @@ class InterfaceParser(FileParser):
|
|||||||
end_name_to_search = conn_helper.sh.start_name_or_value
|
end_name_to_search = conn_helper.sh.start_name_or_value
|
||||||
for end_name_helper in conn_helpers_old:
|
for end_name_helper in conn_helpers_old:
|
||||||
eh = end_name_helper.eh
|
eh = end_name_helper.eh
|
||||||
if (
|
if eh.end_name == end_name_to_search and eh.cumulative_end_value is not None:
|
||||||
eh.end_name == end_name_to_search
|
|
||||||
and eh.cumulative_end_value is not None
|
|
||||||
):
|
|
||||||
self.file_conn_helpers[
|
self.file_conn_helpers[
|
||||||
idx
|
idx
|
||||||
].sh.cumulative_start_index = eh.cumulative_end_value
|
].sh.cumulative_start_index = eh.cumulative_end_value
|
||||||
self.file_conn_helpers[idx].eh.cumulative_end_value = (
|
self.file_conn_helpers[idx].eh.cumulative_end_value = (
|
||||||
eh.cumulative_end_value
|
eh.cumulative_end_value + self.file_conn_helpers[idx].sh.count
|
||||||
+ self.file_conn_helpers[idx].sh.count
|
|
||||||
)
|
)
|
||||||
all_indexes_filled = True
|
all_indexes_filled = True
|
||||||
for idx, conn_helper in enumerate(conn_helpers_old):
|
for idx, conn_helper in enumerate(conn_helpers_old):
|
||||||
@ -333,9 +325,7 @@ class ReturnValueParser(FileParser):
|
|||||||
full_returnvalue_string,
|
full_returnvalue_string,
|
||||||
)
|
)
|
||||||
if returnvalue_match:
|
if returnvalue_match:
|
||||||
number_match = get_number_from_dec_or_hex_str(
|
number_match = get_number_from_dec_or_hex_str(returnvalue_match.group(2))
|
||||||
returnvalue_match.group(2)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
number_match = get_number_from_dec_or_hex_str(returnvalue_match.group(3))
|
number_match = get_number_from_dec_or_hex_str(returnvalue_match.group(3))
|
||||||
if returnvalue_match:
|
if returnvalue_match:
|
||||||
@ -348,7 +338,7 @@ class ReturnValueParser(FileParser):
|
|||||||
return
|
return
|
||||||
if number_match == INVALID_IF_ID:
|
if number_match == INVALID_IF_ID:
|
||||||
_LOGGER.warning(f"Invalid number match detected for file {file_name}")
|
_LOGGER.warning(f"Invalid number match detected for file {file_name}")
|
||||||
_LOGGER.warning(f"Match groups:")
|
_LOGGER.warning("Match groups:")
|
||||||
for group in returnvalue_match.groups():
|
for group in returnvalue_match.groups():
|
||||||
_LOGGER.info(group)
|
_LOGGER.info(group)
|
||||||
self.__handle_returnvalue_match(
|
self.__handle_returnvalue_match(
|
||||||
@ -403,9 +393,7 @@ class ReturnValueParser(FileParser):
|
|||||||
Returns whether the interface ID was found successfully in the IF ID header files
|
Returns whether the interface ID was found successfully in the IF ID header files
|
||||||
"""
|
"""
|
||||||
if self.get_verbosity() == VerbosityLevels.DEBUG:
|
if self.get_verbosity() == VerbosityLevels.DEBUG:
|
||||||
_LOGGER.info(
|
_LOGGER.info(f"Interface ID {interface_id_match.group(1)} found in {file_name}")
|
||||||
f"Interface ID {interface_id_match.group(1)} found in {file_name}"
|
|
||||||
)
|
|
||||||
if_id_entry = self.interfaces.get(interface_id_match.group(1))
|
if_id_entry = self.interfaces.get(interface_id_match.group(1))
|
||||||
if if_id_entry is not None:
|
if if_id_entry is not None:
|
||||||
self.current_interface_id_entries["ID"] = if_id_entry[0]
|
self.current_interface_id_entries["ID"] = if_id_entry[0]
|
||||||
@ -414,9 +402,9 @@ class ReturnValueParser(FileParser):
|
|||||||
f"Interface ID {interface_id_match.group(1)} not found in IF ID dictionary"
|
f"Interface ID {interface_id_match.group(1)} not found in IF ID dictionary"
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
self.current_interface_id_entries["Name"] = self.interfaces[
|
self.current_interface_id_entries["Name"] = self.interfaces[interface_id_match.group(1)][
|
||||||
interface_id_match.group(1)
|
1
|
||||||
][1].lstrip()
|
].lstrip()
|
||||||
self.current_interface_id_entries["FullName"] = interface_id_match.group(1)
|
self.current_interface_id_entries["FullName"] = interface_id_match.group(1)
|
||||||
if self.get_verbosity() == VerbosityLevels.DEBUG:
|
if self.get_verbosity() == VerbosityLevels.DEBUG:
|
||||||
current_id = self.current_interface_id_entries["ID"]
|
current_id = self.current_interface_id_entries["ID"]
|
||||||
|
@ -8,9 +8,7 @@ from pathlib import Path
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def copy_file(
|
def copy_file(filename: Path, destination: Path = "", delete_existing_file: bool = False):
|
||||||
filename: Path, destination: Path = "", delete_existing_file: bool = False
|
|
||||||
):
|
|
||||||
if not os.path.exists(filename):
|
if not os.path.exists(filename):
|
||||||
_LOGGER.warning(f"File {filename} does not exist")
|
_LOGGER.warning(f"File {filename} does not exist")
|
||||||
return
|
return
|
||||||
|
39
lint.py
39
lint.py
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
exclude_dirs_flag = ""
|
|
||||||
if not os.path.exists("setup.cfg"):
|
|
||||||
exclude_dirs_flag = (
|
|
||||||
"--exclude .git,__pycache__,docs/conf.py,old,build,dist,venv"
|
|
||||||
)
|
|
||||||
additional_flags_both_steps = "--count --statistics"
|
|
||||||
additional_flags_first_step = "--select=E9,F63,F7,F82 --show-source"
|
|
||||||
flake8_first_step_cmd = (
|
|
||||||
f"flake8 . {additional_flags_both_steps} "
|
|
||||||
f"{additional_flags_first_step} {exclude_dirs_flag}"
|
|
||||||
)
|
|
||||||
status = os.system(flake8_first_step_cmd)
|
|
||||||
if os.name == "nt":
|
|
||||||
if status != 0:
|
|
||||||
print(f"Flake8 linter errors with status {status}")
|
|
||||||
else:
|
|
||||||
if os.WEXITSTATUS(status) != 0:
|
|
||||||
print(f"Flake8 linter errors with status {status}")
|
|
||||||
sys.exit(0)
|
|
||||||
additional_flags_second_step = (
|
|
||||||
'--exit-zero --max-complexity=10 --per-file-ignores="__init__.py:F401"'
|
|
||||||
)
|
|
||||||
if not os.path.exists("setup.cfg"):
|
|
||||||
additional_flags_second_step += " --max-line-length=100"
|
|
||||||
flake8_second_step_cmd = (
|
|
||||||
f"flake8 . {additional_flags_both_steps} {additional_flags_second_step}"
|
|
||||||
f" {exclude_dirs_flag}"
|
|
||||||
)
|
|
||||||
os.system(flake8_second_step_cmd)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
@ -4,3 +4,13 @@ requires = [
|
|||||||
"wheel"
|
"wheel"
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
exclude = [
|
||||||
|
".git",
|
||||||
|
"venv",
|
||||||
|
"docs"
|
||||||
|
]
|
||||||
|
line-length = 100
|
||||||
|
1
setup.py
1
setup.py
@ -4,6 +4,7 @@ We do the package handling in the static setup.cfg but include an empty setup.py
|
|||||||
to allow editable installs https://packaging.python.org/tutorials/packaging-projects/
|
to allow editable installs https://packaging.python.org/tutorials/packaging-projects/
|
||||||
and provide extensibility
|
and provide extensibility
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user