Skip to content

python: Use pythonic casing for variable names - #15479

Merged
htuch merged 11 commits into
envoyproxy:mainfrom
phlax:py-casing
Mar 17, 2021
Merged

htuch merged 11 commits into
envoyproxy:mainfrom
phlax:py-casing

Conversation

@phlax

@phlax phlax commented Mar 13, 2021

Copy link
Copy Markdown
Member

Signed-off-by: Ryan Northey [email protected]

Commit Message: python: Use pythonic casing for variable names
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] Partial fix for #15403
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).

🐱

Caused by: #15479 was opened by phlax.

see: more, trace.

@repokitteh-read-only repokitteh-read-only Bot added the deps Approval required for changes to Envoy's external dependencies label Mar 13, 2021
Comment thread tools/code_format/flake8.conf Resolved
Comment thread tools/dependency/validate_test.py Resolved
Comment thread tools/type_whisperer/typedb_gen.py Resolved
@moderation

Copy link
Copy Markdown
Contributor

I worry that without machine checking the code will drift very shortly after the PR lands. Where did we end up on using black?

@phlax

phlax commented Mar 13, 2021

Copy link
Copy Markdown
Member Author

I worry that without machine checking the code will drift very shortly after the PR lands. Where did we end up on using black?

this does machine checking for what it changes

ill comment inline...

Comment thread tools/code_format/BUILD Resolved
@phlax

phlax commented Mar 13, 2021

Copy link
Copy Markdown
Member Author

so re black its the step we can consider after we have got the code linted

i think my biggest objection to black is what you might call "more than one way to skin a cat"

ie - if we were to just run black it would make for almost as unreadable code as we have now

my current plan re linting is to do the following:

  • fix casing
  • fix indentation
  • fix other linting issues

this PR is the first step

Signed-off-by: Ryan Northey <[email protected]>
Comment thread tools/code_format/flake8.conf Resolved
Signed-off-by: Ryan Northey <[email protected]>
Comment thread ci/do_ci.sh Resolved
phlax added 3 commits March 14, 2021 06:51
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phlax high-level ask before going through this in detail, can you specify in https://github.com/envoyproxy/envoy/blob/main/STYLE.md#google-style-guides-for-other-languages what the exact specializations of the Google Python style guide are? How does this interact with pep8? Etc.

It would be helpful document explicitly anything that is optional and that we're making opinionated decisions on and ideally make it easy for new Python devs to be able to achieve consistent style without having to read a ton. Anything you can do to that end would be appreciated.

@phlax

phlax commented Mar 16, 2021

Copy link
Copy Markdown
Member Author

It would be helpful document explicitly anything that is optional and that we're making opinionated decisions on and ideally make it easy for new Python devs to be able to achieve consistent style without having to read a ton. Anything you can do to that end would be appreciated.

i will open a PR to update the style guide separately as this PR will not do everything and i guess we dont want to update the style guide incrementally as each PR lands

@phlax

phlax commented Mar 16, 2021

Copy link
Copy Markdown
Member Author

style guide PR added here #15507

htuch
htuch previously approved these changes Mar 17, 2021

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@htuch

htuch commented Mar 17, 2021

Copy link
Copy Markdown
Member

@phlax needs main merge.

Signed-off-by: Ryan Northey <[email protected]>
@phlax

phlax commented Mar 17, 2021

Copy link
Copy Markdown
Member Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #15479 (comment) was created by @phlax.

see: more, trace.

@htuch
htuch merged commit ca1455c into envoyproxy:main Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deps Approval required for changes to Envoy's external dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants