Closed urmich closed 1 year ago
@urmich could you please provide a minimal test case to reproduce this error?.
I will need the configuration you are using and an example file where this error is raised.
I cannot reproduce this problem.
I am getting the same error in this CI job... both source code and CI script are publicly visible and may help analyzing the underlying problem.
Failed build using pydocstyle v6.2.2: The branch where this occurs is where I updated pre-commit hooks and python dependencies. The log of the failed ci job can be seen here: https://github.com/johannesjh/req2flatpak/actions/runs/3838521840/jobs/6535072344
Failed build using pydocstyle v6.2.1: I then downgraded pydocstyle to v6.2.1, but I found that downgrading did not solve the problem. Failed CI pipeline using pydocstyle v6.2.1: https://github.com/johannesjh/req2flatpak/actions/runs/3838866612/jobs/6535865935
Successful build using pydocstyle v6.2.1: I then re-started a ci job for my main branch, and I found it still builds correctly. The logs of the successful CI pipeline using pydocstyle v6.2.1 can be seen here: https://github.com/johannesjh/req2flatpak/actions/runs/3770523717/jobs/6535977049
In summary, it looks like I am experiencing the same problem, the problem occurs reproducably in a ci job... but I am finding it difficult to find the root cause.
@urmich could you please provide a minimal test case to reproduce this error?.
I will need the configuration you are using and an example file where this error is raised.
I cannot reproduce this problem.
Note the OP here is using pydocstyle from pylama, not directly which is why you can't reproduce
It seems the issue stems from the fact that pylama does not specify keywords for keyword arguments so it is passing a wrong value of False for property_decorators to check_source.
This can potentially be fixed if we move https://github.com/PyCQA/pydocstyle/blob/bd294bbf6c80c578716e8817b5de79220ac9f089/src/pydocstyle/checker.py#L137 to be the last argument, but I would really prefer pylama to fix its usage instead.
There seems to be an issue upstream already https://github.com/klen/pylama/issues/232
Please follow up with pylama maintainers for a fix.
I am getting this error since version 6.2.X was released (it was stable with version 6.1.1):
2023-01-04T06:44:25.4284650Z File "/opt/hostedtoolcache/Python/3.8.15/x64/bin/pylama", line 8, in
2023-01-04T06:44:25.4285243Z sys.exit(shell())
2023-01-04T06:44:25.4286919Z File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pylama/main.py", line 115, in shell
2023-01-04T06:44:25.4287643Z errors = check_paths(
2023-01-04T06:44:25.4288717Z File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pylama/main.py", line 68, in check_paths
2023-01-04T06:44:25.4289610Z errors += run(path=path, code=code, rootdir=rootdir, options=options)
2023-01-04T06:44:25.4290788Z File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pylama/core.py", line 36, in run
2023-01-04T06:44:25.4291512Z linter.run_check(ctx)
2023-01-04T06:44:25.4292948Z File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pylama/lint/pylama_pydocstyle.py", line 33, in run_check
2023-01-04T06:44:25.4293855Z for err in PyDocChecker().check_source(
2023-01-04T06:44:25.4295040Z File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pydocstyle/checker.py", line 156, in check_source
2023-01-04T06:44:25.4296384Z error = this_check(
2023-01-04T06:44:25.4297679Z File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pydocstyle/checker.py", line 520, in check_imperative_mood
2023-01-04T06:44:25.4298578Z and not function.is_property(self.property_decorators)
2023-01-04T06:44:25.4299850Z File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pydocstyle/parser.py", line 222, in is_property
2023-01-04T06:44:25.4300565Z return any(
2023-01-04T06:44:25.4301637Z File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pydocstyle/parser.py", line 223, in
2023-01-04T06:44:25.4302433Z decorator.name in property_decorator_names
2023-01-04T06:44:25.4303292Z TypeError: argument of type 'bool' is not iterable