Skip to content

Commit 6e7d7ab

Browse files
committed
Fixed CI and DOC errors
Signed-off-by: Chih Tsung Lu <[email protected]>
1 parent f757361 commit 6e7d7ab

File tree

3 files changed

+2
-45
lines changed

3 files changed

+2
-45
lines changed

pydoclint-errors-baseline.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ flytekit/core/base_sql_task.py
3737
DOC301: Class `SQLTask`: __init__() should not have a docstring; please combine it with the docstring of the class
3838
--------------------
3939
flytekit/core/base_task.py
40-
DOC601: Class `TaskMetadata`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
41-
DOC603: Class `TaskMetadata`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [cache: bool, cache_ignore_input_vars: Tuple[str, ...], cache_serialize: bool, cache_version: str, deprecated: str, interruptible: Optional[bool], is_eager: bool, pod_template_name: Optional[str], retries: int, timeout: Optional[Union[datetime.timedelta, int]]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
4240
DOC301: Class `PythonTask`: __init__() should not have a docstring; please combine it with the docstring of the class
4341
DOC001: Function/method `post_execute`: Potential formatting errors in docstring. Error message: Expected a colon in 'rval is returned value from call to execute'. (Note: DOC001 could trigger other unrelated violations under this function/method too. Please fix the docstring formatting first.)
4442
DOC101: Method `PythonTask.post_execute`: Docstring contains fewer arguments than in function signature.
@@ -172,7 +170,7 @@ flytekit/extras/tensorflow/record.py
172170
--------------------
173171
flytekit/image_spec/image_spec.py
174172
DOC601: Class `ImageSpec`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
175-
DOC603: Class `ImageSpec`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [apt_packages: Optional[List[str]], base_image: Optional[Union[str, 'ImageSpec']], builder: Optional[str], commands: Optional[List[str]], conda_channels: Optional[List[str]], conda_packages: Optional[List[str]], copy: Optional[List[str]], cuda: Optional[str], cudnn: Optional[str], entrypoint: Optional[List[str]], env: Optional[typing.Dict[str, str]], name: str, packages: Optional[List[str]], pip_extra_args: Optional[str], pip_extra_index_url: Optional[List[str]], pip_index: Optional[str], platform: str, python_exec: Optional[str], python_version: str, registry: Optional[str], registry_config: Optional[str], requirements: Optional[str], source_copy_mode: Optional[CopyFileDetection], source_root: Optional[str], tag_format: Optional[str]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
173+
DOC603: Class `ImageSpec`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [apt_packages: Optional[List[str]], base_image: Optional[Union[str, 'ImageSpec']], builder: Optional[str], commands: Optional[List[str]], conda_channels: Optional[List[str]], conda_packages: Optional[List[str]], copy: Optional[List[str]], cuda: Optional[str], cudnn: Optional[str], entrypoint: Optional[List[str]], env: Optional[typing.Dict[str, str]], name: str, packages: Optional[List[str]], pip_extra_args: Optional[str], pip_extra_index_url: Optional[List[str]], pip_index: Optional[str], pip_secret_mounts: Optional[List[Tuple[str, str]]], platform: str, python_exec: Optional[str], python_version: str, registry: Optional[str], registry_config: Optional[str], requirements: Optional[str], source_copy_mode: Optional[CopyFileDetection], source_root: Optional[str], tag_format: Optional[str]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
176174
DOC109: Method `ImageSpecBuilder.build_image`: The option `--arg-type-hints-in-docstring` is `True` but there are no type hints in the docstring arg list
177175
DOC110: Method `ImageSpecBuilder.build_image`: The option `--arg-type-hints-in-docstring` is `True` but not all args in the docstring arg list have type hints
178176
DOC105: Method `ImageSpecBuilder.build_image`: Argument names match, but type hints in these args do not match: image_spec

tests/flytekit/unit/cli/pyflyte/test_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_package_with_fast_registration_and_envvars():
103103
"euler=2.71828",
104104
],
105105
)
106-
106+
107107
assert result.exit_code == 0
108108
assert "Successfully serialized" in result.output
109109
assert "Successfully packaged" in result.output

tests/flytekit/unit/core/test_array_node_map_task.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -351,47 +351,6 @@ def my_wf1() -> typing.List[typing.Optional[int]]:
351351
assert my_wf1() == [1, None, 3, 4]
352352

353353

354-
@task
355-
def my_mappable_task(a: int) -> typing.Optional[str]:
356-
return str(a)
357-
358-
359-
@task(
360-
container_image="original-image",
361-
timeout=timedelta(seconds=10),
362-
interruptible=False,
363-
retries=10,
364-
cache=True,
365-
cache_version="original-version",
366-
requests=Resources(cpu=1)
367-
)
368-
def my_mappable_task_1(a: int) -> typing.Optional[str]:
369-
return str(a)
370-
371-
372-
@pytest.mark.parametrize(
373-
"task_func",
374-
[my_mappable_task, my_mappable_task_1]
375-
)
376-
def test_map_task_override(serialization_settings, task_func):
377-
array_node_map_task = map(task_func)
378-
379-
<<<<<<< Updated upstream
380-
=======
381-
def test_map_task_override(serialization_settings):
382-
@task
383-
def my_mappable_task(a: int) -> typing.Optional[str]:
384-
return str(a)
385-
386-
>>>>>>> Stashed changes
387-
@workflow
388-
def wf(x: typing.List[int]):
389-
map(my_mappable_task)(a=x).with_overrides(container_image="random:image")
390-
391-
assert wf.nodes[0]._container_image == "random:image"
392-
393-
394-
395354
def test_serialization_metadata(serialization_settings):
396355
@task(interruptible=True)
397356
def t1(a: int) -> int:

0 commit comments

Comments
 (0)