Skip to content

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Sep 8, 2025

% ruff format # https://docs.astral.sh/ruff/formatter

 160 files changed, 30014 insertions(+), 32975 deletions(-)

Improve readability while removing 2,961 unnecessary lines.

ruff format should be added to code generation processes.

python3 -m pip install pycodestyle
export PATH=$PATH:$HOME/.local/bin
pycodestyle examples/*
pycodestyle --max-line-length=88 examples/*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd go with 100.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for 88 (not 100) was explained in that URL.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. I used to be strongly in favor of 80 but it does make it awkward when you want to have variable names that actually explain what they are instead of acronyms or abbreviations.

Copy link
Collaborator

Choose a reason for hiding this comment

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

For the simple examples, I'm just going to leave it at the default pycodestyle 79 for now.

python3 -m pip install pycodestyle
export PATH=$PATH:$HOME/.local/bin
pycodestyle examples/*
pycodestyle --max-line-length=88 examples/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd go with 100.

class OrbitYawBehavior(Enum):
"""
Yaw behaviour during orbit flight.
Yaw behaviour during orbit flight.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto-generated!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please read the commit message.

ruff format should be added to code generation processes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@cclauss cclauss mentioned this pull request Sep 9, 2025
Copy link
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

Alright, let me get this in and add in the other PRs on top of it.

python3 -m pip install pycodestyle
export PATH=$PATH:$HOME/.local/bin
pycodestyle examples/*
pycodestyle --max-line-length=88 examples/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. I used to be strongly in favor of 80 but it does make it awkward when you want to have variable names that actually explain what they are instead of acronyms or abbreviations.

Copy link
Collaborator

Choose a reason for hiding this comment

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

python3 -m pip install pycodestyle
export PATH=$PATH:$HOME/.local/bin
pycodestyle examples/*
pycodestyle --max-line-length=88 examples/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

For the simple examples, I'm just going to leave it at the default pycodestyle 79 for now.

class OrbitYawBehavior(Enum):
"""
Yaw behaviour during orbit flight.
Yaw behaviour during orbit flight.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@julianoes julianoes merged commit 9692e6e into mavlink:main Sep 9, 2025
9 checks passed
@cclauss cclauss deleted the ruff-format branch September 10, 2025 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants