Skip to content

Commit

Permalink
Fix some typoes
Browse files Browse the repository at this point in the history
  • Loading branch information
grouigrokon committed Jun 26, 2024
1 parent 2b15db3 commit 1b97a38
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/e3/anod/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
]
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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 ???
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1b97a38

Please sign in to comment.