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

Add linters to deltametrics: flake8-simplify #191

Merged

Conversation

mcflugen
Copy link
Collaborator

Adds the flake8-simplify linter to sandplover and fixes some issues.

Issues fixed include:

  • Multiple isinstance calls that can be merged into a single call by using a tuple as a second argument
  • Use a single if statement instead of nested if statements
  • Combine conditions via a logical or to prevent duplicating code
  • Use key in dict instead of key in dict.keys()
  • Reflexive statements (i.e. remove statements like cmap = cmap)

@mcflugen mcflugen force-pushed the mcflugen/add-flake8-simplify branch from ae81406 to 8e8aacd Compare December 20, 2024 00:17
@mcflugen mcflugen force-pushed the mcflugen/add-flake8-simplify branch from 8e8aacd to 683a7cd Compare December 20, 2024 16:13
@mcflugen mcflugen merged commit 75edf17 into sandpiper-toolchain:develop Dec 20, 2024
9 checks passed
@mcflugen mcflugen deleted the mcflugen/add-flake8-simplify branch December 20, 2024 16:41
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.

1 participant