Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

[ci] remove unnecessary f-strings #190

Merged
merged 1 commit into from
Aug 29, 2022
Merged

[ci] remove unnecessary f-strings #190

merged 1 commit into from
Aug 29, 2022

Conversation

jameslamb
Copy link
Contributor

Contributes to #161.

Changes

  • removes uses of f-strings without any templating

Testing

N/A

Notes

Contributes to #161 because flake8 detected these uses.

./hamilton/function_modifiers.py:323:30: F541 f-string is missing placeholders
./hamilton/function_modifiers.py:1119:21: F541 f-string is missing placeholders
./hamilton/function_modifiers.py:1124:34: F541 f-string is missing placeholders
./hamilton/experimental/h_async.py:114:17: F541 f-string is missing placeholders
./hamilton/experimental/h_async.py:141:17: F541 f-string is missing placeholders
./hamilton/data_quality/default_validators.py:224:30: F541 f-string is missing placeholders
./hamilton/data_quality/default_validators.py:418:13: F541 f-string is missing placeholders
./hamilton/data_quality/pandera_validators.py:23:16: F541 f-string is missing placeholders
./hamilton/dev_utils/deprecation.py:125:27: F541 f-string is missing placeholders
./hamilton/dev_utils/deprecation.py:143:27: F541 f-string is missing placeholders

Fixing such issues and having flake8 catch them is useful because using f-strings with string literals that don't have templating adds a small amount of unnecessary computation.

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Python - local testing

  • python 3.6
  • python 3.7

@skrawcz
Copy link
Collaborator

skrawcz commented Aug 29, 2022

That one ray test is broken -- #189 will fix it.

@skrawcz skrawcz merged commit def6c92 into stitchfix:main Aug 29, 2022
@jameslamb jameslamb deleted the fix/f-strings branch August 29, 2022 04:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants