mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-01-17 11:43:41 +00:00
Docstring update (#58)
* migrate docstrings from reST to google format * add raises note Also change behaviour of the `from_option` method to fallback to disabled instead of raising exception on unknown option * fix part of warnings for sphinx * make identation a bit more readable * review fixes * add verbose description for properties to make them parsed by sphinx extenstion * add demo sphinx generator
This commit is contained in:
@ -9,9 +9,13 @@ from ahriman.models.package_source import PackageSource
|
||||
def _is_file_mock(is_any_file: bool, is_pkgbuild: bool) -> Callable[[Path], bool]:
|
||||
"""
|
||||
helper to mock is_file method
|
||||
:param is_any_file: value which will be return for any file
|
||||
:param is_pkgbuild: value which will be return if PKGBUILD like path asked
|
||||
:return: side effect function for the mocker object
|
||||
|
||||
Args:
|
||||
is_any_file(bool): value which will be return for any file
|
||||
is_pkgbuild(bool): value which will be return if PKGBUILD like path asked
|
||||
|
||||
Returns:
|
||||
Callable[[Path], bool]: side effect function for the mocker object
|
||||
"""
|
||||
side_effect: Callable[[Path], bool] = lambda source: is_pkgbuild if source.name == "PKGBUILD" else is_any_file
|
||||
return side_effect
|
||||
|
||||
Reference in New Issue
Block a user