From 1b97a38d20fe478db6087a175cac4d8ca83c0ae8 Mon Sep 17 00:00:00 2001 From: Frederic Leger Date: Wed, 26 Jun 2024 16:30:05 +0200 Subject: [PATCH] Fix some typoes --- src/e3/anod/spec.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/e3/anod/spec.py b/src/e3/anod/spec.py index 981443d3..73eda085 100644 --- a/src/e3/anod/spec.py +++ b/src/e3/anod/spec.py @@ -32,7 +32,7 @@ # Version 1.4 (initial version) # Version 1.5 # NEW: YAML files are searched in subdirectories whose basename is the -# the associated spec basename. +# associated spec basename. # DEPRECATED: YAML files in same directory as the spec # Version 1.6 # NEW: Add support for spec function automatically declared inside each spec @@ -69,7 +69,7 @@ BUILD_PRIMITIVE, DOWNLOAD_PRIMITIVE, INSTALL_PRIMITIVE, SOURCE_PRIMITIVE ] - # Supported primitivies are build, install, source, and test + # Supported primitives are build, install, source, and test PRIMITIVE = Union[ BUILD_PRIMITIVE, INSTALL_PRIMITIVE, SOURCE_PRIMITIVE, TEST_PRIMITIVE ] @@ -134,9 +134,9 @@ def fetch_attr(instance: Any, name: str, default_value: Any) -> Any: this does not hide AttributeError exceptions that getting an existing attribute might raise. """ - # Singleton used to determine whether call to gettattr returns the default - # value (i.e. attribute is missing) or just returns the attribute value (it - # could be None). + # Singleton used to determine whether call to ``gettattr()`` returns the + # default value (i.e. attribute is missing) or just returns the attribute + # value (it could be ``None``). sentinel = object() return ( @@ -173,7 +173,7 @@ class MyProduct(Anod): :cvar sandbox: e3.anod.sandbox.SandBox object shared by all Anod instances :vartype sandbox: e3.anod.sandbox.SandBox | None - Some attributes are meant the be overwritten in the specification file: + Some attributes are meant to be overwritten in the specification file: :cvar source_pkg_build: a dictionary associating Anod.SourceBuilder to the Anod.Source names @@ -494,7 +494,7 @@ def load_config_file( list of available file is set by the data_files parameter when initializing the spec. - :param suffix: suffix of the configuration file (default is '') + :param suffix: suffix of the configuration file (default is None) :param extended: if True then a special yaml parser is used with ability to use case statement :param selectors: additional selectors for extended mode @@ -529,7 +529,7 @@ def __getitem__(self, key: str) -> Any: __getitem__, e.g. self['PKG_DIR'] to access self.build_space.pkg_dir values. - Also directly access items returned by the ``pre`` callback. + Also, directly access items returned by the ``pre`` callback. """ if self.__build_space is None: return "unknown" @@ -552,9 +552,10 @@ def get_qualifier(self, qualifier_name: str) -> str | bool | frozenset[str] | No Requires that qualifiers_manager attribute has been initialized and its parse method called. - :return: The qualifier value. Its a string for key value qualifiers and a bool - for tag qualifiers. - Return None if the name_generator is disabled. + :return: The qualifier value: + - A string for key value qualifiers + - A bool for tag qualifiers + - ``None`` if the name_generator is disabled """ if self.enable_name_generator: assert self.qualifiers_manager is not None @@ -592,10 +593,8 @@ def primitive_dec(f, pre=pre, post=post, version=version): # type: ignore def primitive_func(self, *args, **kwargs): # type: ignore self.log.debug("%s %s starts", self.name, f.__name__) - result = False - # Ensure temporary directory is set to a directory local to - # the current sandbox. This avoid mainly to loose track of + # the current sandbox. This avoids mainly to lose track of # temporary files that are then accumulating on the # filesystems. # ??? Temporary fix for T409-012 ??? @@ -655,7 +654,7 @@ def module_name(self) -> str: @property def anod_id(self) -> str: - """For backward compativility purpose.""" + """For backward compatibility purpose.""" return self.uid @property