Minor typos and doc-strings added#28607
Minor typos and doc-strings added#28607stamixthereal wants to merge 4 commits intoapache:mainfrom stamixthereal:main
Conversation
A minor typos were found in the code docstrings and comments and were fixed in this commit.
A minor typos were found in the code docstrings and comments and were fixed in this commit.
A minor typos were found in the code docstrings and comments and were fixed in this commit.
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
| new_cls = super().__new__(cls, name, bases, namespace, **kwargs) | ||
| with contextlib.suppress(KeyError): | ||
| # Update the partial descriptor with the class method so it call call the actual function (but let | ||
| # Update the partial descriptor with the class method, so it call the actual function (but let |
There was a problem hiding this comment.
| # Update the partial descriptor with the class method, so it call the actual function (but let | |
| # Update the partial descriptor with the class method, so it calls the actual function (but let |
|
|
||
| if downstream: | ||
| tasks += [t.task_id for t in self.get_flat_relatives(upstream=False)] | ||
| tasks += [t.task_id for t in self.get_flat_relatives()] |
There was a problem hiding this comment.
The default value of upstream is False, and we need to keep it for backward compatibility, but I’d prefer to keep it at the call sites for explicitness.
| template_ext: Sequence[str] = (".sh",) | ||
| template_ext: Sequence[str] = ( | ||
| ".sh", | ||
| ".bash", | ||
| ) |
There was a problem hiding this comment.
This looks unrelated? I’m not against its addition, but it should be done in a separate PR.
| Args: | ||
| classname: The classname to translate. | ||
|
|
||
| Returns: | ||
| The translated pytest selector. |
There was a problem hiding this comment.
We generally use Sphinx-style derivatives instead of Google-style. See other functions for examples.
| context = Path.cwd() | ||
|
|
||
| context = str(Path.cwd()) | ||
| parts = classname.split(".") | ||
| num_parts = len(parts) | ||
| i = 0 | ||
|
|
||
| for i, component in enumerate(parts): | ||
| candidate = context / component | ||
| while i < num_parts: | ||
| component = parts[i] | ||
| candidate = context + "/" + component | ||
|
|
||
| if candidate.is_dir(): | ||
| context = candidate | ||
| continue | ||
| candidate = context / (component + ".py") | ||
| if candidate.is_file(): | ||
| if Path(candidate).is_dir(): | ||
| context = candidate | ||
| i += 1 | ||
| elif Path(candidate + ".py").is_file(): | ||
| context = candidate + ".py" | ||
| i += 1 | ||
| break | ||
| break | ||
| else: | ||
| break | ||
|
|
||
| parts = parts[i:] | ||
|
|
||
| val = str(context.relative_to(Path.cwd())) | ||
| val = str(Path(context).relative_to(Path.cwd())) |
There was a problem hiding this comment.
Why is this particular function rewritten so extensively? This should be done in a different PR, and honestly I’m not sure the rewrite is an improvement to begine with.
Minor typos were found in the code docstrings and comments and were fixed in this commit:
airflow/api/client/json_client.pyairflow/models/baseoperator.py.bashextension toairflow/providers/ssh/operators/ssh.pyscripts/ci/testing/summarize_junit_failures.py