Merge pull request #19394 from FreeCAD/pre-commit-ci-update-config

Update Black to 25.1.0 so that it is in sync with the CI. Updates code to correspond to new Black standards, mostly changing the Addon Manager to eliminate spaces around docstrings.
This commit is contained in:
Chris Hennes
2025-02-07 08:52:20 -06:00
committed by GitHub
52 changed files with 76 additions and 77 deletions

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Defines the Addon class to encapsulate information about FreeCAD Addons """
"""Defines the Addon class to encapsulate information about FreeCAD Addons"""
import os
import re

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Contains a the Addon Manager's preferences dialog management class """
"""Contains a the Addon Manager's preferences dialog management class"""
import os

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Classes and structures related to Addon sidecar information """
"""Classes and structures related to Addon sidecar information"""
from __future__ import annotations
from dataclasses import dataclass

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Defines a QWidget-derived class for displaying the single-addon buttons. """
"""Defines a QWidget-derived class for displaying the single-addon buttons."""
from enum import Enum, auto

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Defines a QWidget-derived class for displaying the view selection buttons. """
"""Defines a QWidget-derived class for displaying the view selection buttons."""
from enum import IntEnum

View File

@@ -21,9 +21,9 @@
# * *
# ***************************************************************************
""" Defines a QWidget-derived class for displaying a set of buttons that affect the Addon
"""Defines a QWidget-derived class for displaying a set of buttons that affect the Addon
Manager as a whole (rather than a specific Addon). Typically inserted at the bottom of the Addon
Manager main window. """
Manager main window."""
try:
import FreeCAD

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Defines a QWidget-derived class for displaying the cache load status. """
"""Defines a QWidget-derived class for displaying the cache load status."""
try:
import FreeCAD

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Defines a QWidget-derived class for displaying the view selection buttons. """
"""Defines a QWidget-derived class for displaying the view selection buttons."""
try:
import FreeCAD

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Defines a class derived from QWidget for displaying the bar at the top of the addons list. """
"""Defines a class derived from QWidget for displaying the bar at the top of the addons list."""
from enum import IntEnum, auto

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Defines a QWidget-derived class for displaying the view selection buttons. """
"""Defines a QWidget-derived class for displaying the view selection buttons."""
from enum import IntEnum

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" System for checking the network connection status asynchronously. """
"""System for checking the network connection status asynchronously."""
import FreeCAD

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Classes to manage "Developer Mode" """
"""Classes to manage "Developer Mode" """
import os
import datetime

View File

@@ -21,8 +21,8 @@
# * *
# ***************************************************************************
""" Contains a class for adding a single content item, as well as auxiliary classes for
its dependent dialog boxes. """
"""Contains a class for adding a single content item, as well as auxiliary classes for
its dependent dialog boxes."""
import os
from typing import Optional, Tuple, List

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Contains a class to manage selection of a license for an Addon. """
"""Contains a class to manage selection of a license for an Addon."""
import os
from datetime import date

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Contains a wrapper class for a table listing authors and maintainers """
"""Contains a wrapper class for a table listing authors and maintainers"""
import os

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Metadata validation functions """
"""Metadata validation functions"""
from typing import List

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Contains a wrapper class for a table listing authors and maintainers """
"""Contains a wrapper class for a table listing authors and maintainers"""
import os

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Contains a class to handle editing a person (from a Metadata standpoint). """
"""Contains a class to handle editing a person (from a Metadata standpoint)."""
import os
from typing import Tuple # Needed until Py 3.9, when tuple supports this directly

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Class to guess metadata based on folder contents. Note that one of the functions
"""Class to guess metadata based on folder contents. Note that one of the functions
of this file is to guess the license being applied to the new software package based
in its contents. It is up to the user to make the final determination about whether
the selected license is the correct one, and inclusion here shouldn't be construed as

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Validators used for various line edits """
"""Validators used for various line edits"""
import keyword

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Class to display a first-run dialog for the Addon Manager """
"""Class to display a first-run dialog for the Addon Manager"""
import os

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Contains the classes to manage Addon installation: intended as a stable API, safe for external
"""Contains the classes to manage Addon installation: intended as a stable API, safe for external
code to call and to rely upon existing. See classes AddonInstaller and MacroInstaller for details.
"""
import json

View File

@@ -21,9 +21,9 @@
# * *
# ***************************************************************************
""" Utilities for working with licenses. Based on SPDX info downloaded from
"""Utilities for working with licenses. Based on SPDX info downloaded from
https://github.com/spdx/license-list-data and stored as part of the FreeCAD repo, loaded into a Qt
resource. """
resource."""
import json

View File

@@ -22,7 +22,7 @@
# * *
# ***************************************************************************
""" Unified handler for FreeCAD macros that can be obtained from different sources. """
"""Unified handler for FreeCAD macros that can be obtained from different sources."""
import os
import re

View File

@@ -21,9 +21,9 @@
# * *
# ***************************************************************************
""" Provides classes and support functions for managing the automatically-installed
"""Provides classes and support functions for managing the automatically-installed
Python library dependencies. No support is provided for uninstalling those dependencies
because pip's uninstall function does not support the target directory argument. """
because pip's uninstall function does not support the target directory argument."""
import json
import os

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" A Qt Widget for displaying Addon README information """
"""A Qt Widget for displaying Addon README information"""
import FreeCAD
from Addon import Addon

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Contains the classes to manage Addon removal: intended as a stable API, safe for
"""Contains the classes to manage Addon removal: intended as a stable API, safe for
external code to call and to rely upon existing. See classes AddonUninstaller and
MacroUninstaller for details."""
import json

View File

@@ -22,7 +22,7 @@
# * *
# ***************************************************************************
""" Utilities to work across different platforms, providers and python versions """
"""Utilities to work across different platforms, providers and python versions"""
from datetime import datetime
from typing import Optional, Any, List

View File

@@ -22,7 +22,7 @@
# * *
# ***************************************************************************
""" Worker thread classes for Addon Manager installation and removal """
"""Worker thread classes for Addon Manager installation and removal"""
# pylint: disable=c-extension-no-member,too-few-public-methods,too-many-instance-attributes

View File

@@ -22,7 +22,7 @@
# * *
# ***************************************************************************
""" Worker thread classes for Addon Manager startup """
"""Worker thread classes for Addon Manager startup"""
import hashlib
import json
import os

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Misc. worker thread classes for the FreeCAD Addon Manager. """
"""Misc. worker thread classes for the FreeCAD Addon Manager."""
from typing import Optional

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Provides a class for showing the list view and detail view at the same time. """
"""Provides a class for showing the list view and detail view at the same time."""
import base64

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" A collection of functions to handle installing a macro icon to the toolbar. """
"""A collection of functions to handle installing a macro icon to the toolbar."""
import os

View File

@@ -21,7 +21,7 @@
# * *
# ***************************************************************************
""" Defines the PackageList QWidget for displaying a list of Addons. """
"""Defines the PackageList QWidget for displaying a list of Addons."""
import datetime
import threading