Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Align with PEP8, PEP257 #5995

Open
arcward opened this issue Jul 6, 2017 · 3 comments
Open

[Python] Align with PEP8, PEP257 #5995

arcward opened this issue Jul 6, 2017 · 3 comments

Comments

@arcward
Copy link
Contributor

arcward commented Jul 6, 2017

Description

Since #3041 it seems the templates have drifted a bit from PEP8 guidelines. A couple examples that jumped at me:

  • Some inconsistencies with acronym capitalization (ex: RESTClientObject and ApiClient) ref
  • Lots of one-line docstrings taking up 3 lines ref
  • Docstrings on property setters that are ignored by help() and tools like Sphinx: example from Python docs

Not in PEP8, but there are a few instances where default values are set in __init__() using property setters before the underlying attribute is declared, which will throw an AttributeError if that initial assignment isn't made.

These are pretty low-key, but it'll help keep the linters quiet

Swagger-codegen version

2.2.0 and 2.3.0

Related issues

#3041

Suggest a Fix

I can clean up the templates a bit and create a PR (I did quite a bit of it already)

@wing328
Copy link
Contributor

wing328 commented Jul 6, 2017

@arcward thanks for offering help to improve the code quality. If you need help with the PR, please let us know.

@kenjones-cisco
Copy link
Contributor

Server completed in PR #6826
Client completed in PR #6839

@mloskot
Copy link

mloskot commented Apr 15, 2020

Since the two PRs mentione din #5995 (comment) have been merged, is this issue closable now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants