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

improve pre-commit hooks, replace flake8 & pylint with ruff #2441

Merged
merged 12 commits into from
Jul 23, 2024

Conversation

ITProKyle
Copy link
Collaborator

@ITProKyle ITProKyle commented Jul 17, 2024

Summary

Replace flake8, isort, and pylint with ruff.

What Changed

Added

  • (pre-commit): added check-toml hook
  • (pre-commit): added toml-sort hook
  • (pre-commit): added mdformat hook
  • (deps): added ruff
    • added config
    • applied changes to satisfy ruff's rules

Changed

  • (pre-commit): updated exclude/include for pretty-format-json to format more files
  • (pre-commit): changed files to exclude for yamlfmt hook so that it handles automatic formatting for more files
  • (black): line-length is now set to 100 to allow longer lines
  • (deps): moved black to lint group

Removed

  • (pre-commit): removed black hook
    • while it can be nice to run black as a pre-commit hook, managing it's version and the versions of it's dependencies is difficult resulting in mismatches and errors
  • (pre-commit): removed isort hook as isort is no longer in use
  • (pre-commit): removed flake8 hook as flake8 is no longer in use
  • (deps): removed use of flake8, isort, and pylint
    • removed all plugins
    • removed all configuration and comments related to these
  • (deps): removed backports.cached_property as it will never be installed with current python version requirement
  • (deps): removed importlib-metadata as it will never be installed with current python version requirement

@ITProKyle ITProKyle added the changelog:skip Don't include this pull request in the release change log label Jul 17, 2024
@ITProKyle ITProKyle self-assigned this Jul 17, 2024
@github-actions github-actions bot added cloudformation Changes to CloudFormation templates javascript Pull request that updates Javascript code maintenance General repo or CI/CD upkeep poetry Update to Poetry configuration pyinstaller python Update to Python code labels Jul 17, 2024
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 90.75975% with 135 lines in your changes missing coverage. Please review.

Project coverage is 90.13%. Comparing base (a2c43c4) to head (9558248).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2441      +/-   ##
==========================================
- Coverage   90.18%   90.13%   -0.05%     
==========================================
  Files         247      247              
  Lines       15677    15610      -67     
==========================================
- Hits        14138    14070      -68     
- Misses       1539     1540       +1     
Files Coverage Δ
runway/__init__.py 75.00% <100.00%> (+2.27%) ⬆️
runway/_cli/commands/_deploy.py 84.61% <100.00%> (ø)
runway/_cli/commands/_destroy.py 87.50% <100.00%> (ø)
runway/_cli/commands/_envvars.py 91.66% <100.00%> (ø)
runway/_cli/commands/_gen_sample/_k8s_tf_repo.py 100.00% <100.00%> (ø)
runway/_cli/commands/_gen_sample/_tf.py 100.00% <100.00%> (ø)
runway/_cli/commands/_gen_sample/utils.py 100.00% <ø> (ø)
runway/_cli/commands/_init.py 100.00% <100.00%> (ø)
runway/_cli/commands/_kbenv/__init__.py 100.00% <100.00%> (ø)
runway/_cli/commands/_kbenv/_list.py 100.00% <100.00%> (ø)
... and 186 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2c43c4...9558248. Read the comment docs.

@ITProKyle ITProKyle marked this pull request as ready for review July 22, 2024 20:40
@ITProKyle ITProKyle changed the title update pre-commit, use some new hooks, remove python linting hooks revise pre-commit hooks, replace flake8 & pylint with ruff Jul 22, 2024
@ITProKyle ITProKyle changed the title revise pre-commit hooks, replace flake8 & pylint with ruff improve pre-commit hooks, replace flake8 & pylint with ruff Jul 22, 2024
Copy link
Contributor

@mbordash2 mbordash2 left a comment

Choose a reason for hiding this comment

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

🚀

@ITProKyle ITProKyle merged commit fd06ee7 into rackspace:master Jul 23, 2024
22 checks passed
@ITProKyle ITProKyle deleted the chore/modernize-linters branch July 23, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:skip Don't include this pull request in the release change log cloudformation Changes to CloudFormation templates javascript Pull request that updates Javascript code maintenance General repo or CI/CD upkeep poetry Update to Poetry configuration python Update to Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants