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

Ran autopep8 #1698

Merged
merged 3 commits into from
Jan 19, 2024
Merged

Ran autopep8 #1698

merged 3 commits into from
Jan 19, 2024

Conversation

externl
Copy link
Member

@externl externl commented Jan 19, 2024

I ran autopep8 over the all the python files. It only performs non-breaking changes. In a follow-up PR I plan to do more of the manual lints.

@externl externl requested a review from pepone January 19, 2024 15:52
@ReeceHumphreys
Copy link
Contributor

I think we should be formatting and linting with Ruff https://docs.astral.sh/ruff/. It seems like it has taken off over the past few years and is generally the recommended tool for Python formatting and linting. It is basically a drop in replacement for the Flake8 + Black + isort + ... python linting and formatting toolchain.

I have been testing it locally for the past few days on the metrics project and it is considerably faster than those other tools too!

@externl
Copy link
Member Author

externl commented Jan 19, 2024

I think we should be formatting and linting with Ruff https://docs.astral.sh/ruff/. It seems like it has taken off over the past few years and is generally the recommended tool for Python formatting and linting. It is basically a drop in replacement for the Flake8 + Black + isort + ... python linting and formatting toolchain.

I have been testing it locally for the past few days on the metrics project and it is considerably faster than those other tools too!

Definitely something we can look into once the baseline linting is done!

Glacier2StaticFilteringTestSuite(__name__, testcases=[], runOnMainThread=True, options={ "ipv6" : [False] }, multihost=False)

Glacier2StaticFilteringTestSuite(__name__, testcases=[], runOnMainThread=True,
options={"ipv6": [False]}, multihost=False)
Copy link
Member

Choose a reason for hiding this comment

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

Is this configurable? I prefer one parameter per line when we have to split a long line.

Copy link
Member Author

Choose a reason for hiding this comment

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

For now I think we should just to the defaults. Once all the linting is done we can go back and tweak the style if we really want to.

if isinstance(platform, Windows) or os.getuid() != 0:
TestSuite(__file__, [IceGridUpdateTestCase(application=None, client=IceGridClient(props=clientProps))], multihost=False)
TestSuite(__file__, [IceGridUpdateTestCase(application=None,
client=IceGridClient(props=clientProps))], multihost=False)
Copy link
Member

Choose a reason for hiding this comment

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

I don't like this formatting very much

TestSuite(__file__, 
          [IceGridUpdateTestCase(application=None, client=IceGridClient(props=clientProps))],
          multihost=False)

seems more natural

Copy link
Member Author

Choose a reason for hiding this comment

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

For now I think we should just to the defaults. Once all the linting is done we can go back and tweak the style if we really want to.

@externl externl merged commit 0114860 into zeroc-ice:main Jan 19, 2024
18 of 19 checks passed
@externl externl deleted the python-autopep8 branch January 19, 2024 18:25
InsertCreativityHere pushed a commit to InsertCreativityHere/compiler-comparison that referenced this pull request Jan 1, 2025
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.

3 participants