Skip to content

Conversation

@bmos
Copy link
Contributor

@bmos bmos commented Mar 3, 2025

See here
https://docs.astral.sh/ruff/rules/#flake8-bugbear-b

Includes code changes to get tests passing

There might need to be some discussion about some of these rules, but most of them are quite helpful IMO

For E722 (don't use bare Except), since I don't know what the correct Exception class is for existing code, I added noqa declarations to the 9 places that currently violate this rule to get this to pass (so it will protect against this in future code).

Current lines:
parsons/aws/lambda_distribute.py: 257
parsons/aws/s3.py: 117
parsons/aws/s3.py: 440
parsons/databases/db_sync.py: 97
parsons/databases/db_sync.py: 360
parsons/nation_builder/nation_builder.py: 111
test/test_s3.py: 51
useful_resources/sample_code/mysql_to_googlesheets.py: 72
useful_resources/sample_code/s3_to_redshift.py: 60

@github-actions
Copy link

github-actions bot commented Mar 3, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  parsons/action_network
  action_network.py 1257, 1279
  parsons/auth0
  auth0.py 110, 112
  parsons/aws
  aws_async.py 62
  parsons/box
  box.py 402
  parsons/databases
  alchemy.py 80
  parsons/databases/postgres
  postgres_create_statement.py
  parsons/databases/redshift
  rs_create_table.py
  rs_table_utilities.py
  parsons/etl
  table.py
  parsons/formstack
  formstack.py 71
  parsons/github
  github.py
  parsons/google
  google_bigquery.py 1039-1040
  google_sheets.py 60-61, 291
  parsons/newmode
  newmode.py 66, 203-204, 224, 262, 300, 340, 423, 451, 617-618
  parsons/ngpvan
  events.py
  people.py
  survey_questions.py
  parsons/notifications
  slack.py
  parsons/pdi
  flags.py 32-33, 64-65
  parsons/phone2action
  p2a.py 30-31
  parsons/utilities
  api_connector.py
  check_env.py
  parsons/zoom
  zoom.py 597-598
Project Total  

This report was generated by python-coverage-comment-action

@shaunagm shaunagm merged commit 889ea97 into move-coop:main Jun 26, 2025
70 checks passed
@bmos bmos deleted the flake8-bugbear branch June 26, 2025 22:46
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