Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Version 6.2.x breakes pylama #621

Closed
urmich opened this issue Jan 4, 2023 · 7 comments
Closed

Version 6.2.x breakes pylama #621

urmich opened this issue Jan 4, 2023 · 7 comments
Labels
Triage: In Discussion This issue is being discussed and isn't yet ready to implement (it might get dismissed)

Comments

@urmich
Copy link

urmich commented Jan 4, 2023

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

@urmich urmich changed the title Version 6.2.X breacks pydocstyle Version 6.2.x breacks pydocstyle Jan 4, 2023
@urmich urmich changed the title Version 6.2.x breacks pydocstyle Version 6.2.x breakes pydocstyle Jan 4, 2023
@samj1912
Copy link
Member

samj1912 commented Jan 4, 2023

@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.

@johannesjh
Copy link

johannesjh commented Jan 4, 2023

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.

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.

@sigmavirus24
Copy link
Member

@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

@sigmavirus24 sigmavirus24 changed the title Version 6.2.x breakes pydocstyle Version 6.2.x breakes pylama Jan 4, 2023
@samj1912
Copy link
Member

samj1912 commented Jan 5, 2023

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.

@samj1912
Copy link
Member

samj1912 commented Jan 5, 2023

This can potentially be fixed if we move

property_decorators=None,
to be the last argument, but I would really prefer pylama to fix its usage instead.

@samj1912 samj1912 added Triage: In Discussion This issue is being discussed and isn't yet ready to implement (it might get dismissed) and removed help wanted good first issue bug labels Jan 5, 2023
@samj1912
Copy link
Member

samj1912 commented Jan 5, 2023

There seems to be an issue upstream already klen/pylama#232

@samj1912
Copy link
Member

samj1912 commented Jan 5, 2023

Please follow up with pylama maintainers for a fix.

@samj1912 samj1912 closed this as completed Jan 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Triage: In Discussion This issue is being discussed and isn't yet ready to implement (it might get dismissed)
Projects
None yet
Development

No branches or pull requests

4 participants