Add docformatter to pre-commit (#5279)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Burhan <62214284+Burhan-Q@users.noreply.github.com>
This commit is contained in:
parent
c7aa83da31
commit
7517667a33
90 changed files with 1396 additions and 497 deletions
8
setup.py
8
setup.py
|
|
@ -12,6 +12,12 @@ README = (PARENT / 'README.md').read_text(encoding='utf-8')
|
|||
|
||||
|
||||
def get_version():
|
||||
"""
|
||||
Retrieve the version number from the 'ultralytics/__init__.py' file.
|
||||
|
||||
Returns:
|
||||
(str): The version number extracted from the '__version__' attribute in the 'ultralytics/__init__.py' file.
|
||||
"""
|
||||
file = PARENT / 'ultralytics/__init__.py'
|
||||
return re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', file.read_text(encoding='utf-8'), re.M)[1]
|
||||
|
||||
|
|
@ -24,7 +30,7 @@ def parse_requirements(file_path: Path):
|
|||
file_path (str | Path): Path to the requirements.txt file.
|
||||
|
||||
Returns:
|
||||
List[str]: List of parsed requirements.
|
||||
(List[str]): List of parsed requirements.
|
||||
"""
|
||||
|
||||
requirements = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue