Fixed D401

This commit is contained in:
Dimitris Zlatanidis 2024-05-22 17:03:25 +03:00
parent 8fbb8e8590
commit 0df1f9cd43

View file

@ -46,10 +46,10 @@ class NewConfigs: # pylint: disable=[R0902]
self.endc: str = '' self.endc: str = ''
def check(self) -> None: def check(self) -> None:
"""Checks for .new files.""" """Check for .new files."""
print('Checking for NEW configuration files...\n') print('Checking for NEW configuration files...\n')
if (self.slpkg_config_new.is_file() or self.blacklist_config_new.is_file() if (self.slpkg_config_new.is_file()
or self.repositories_config_new.is_file()): or self.blacklist_config_new.is_file() or self.repositories_config_new.is_file()):
print('There are NEW files:\n') print('There are NEW files:\n')
if self.slpkg_config_new.is_file(): if self.slpkg_config_new.is_file():
@ -95,7 +95,7 @@ class NewConfigs: # pylint: disable=[R0902]
@staticmethod @staticmethod
def keep() -> None: def keep() -> None:
"""Prints a message.""" """Print a message."""
print("\nNo changes were made.\n") print("\nNo changes were made.\n")
def overwrite(self) -> None: def overwrite(self) -> None:
@ -139,7 +139,7 @@ class NewConfigs: # pylint: disable=[R0902]
print(f"mv {self.blacklist_config_new} -> {self.green}{self.blacklist_config}{self.endc}") print(f"mv {self.blacklist_config_new} -> {self.green}{self.blacklist_config}{self.endc}")
def remove(self) -> None: def remove(self) -> None:
"""Removes the .new files.""" """Remove the .new files."""
print() # new line print() # new line
self.remove_config_new_file() self.remove_config_new_file()
self.remove_repositories_new_file() self.remove_repositories_new_file()