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

[REF] Fix more f strings #3776

Merged
merged 10 commits into from Jun 29, 2023
Merged

[REF] Fix more f strings #3776

merged 10 commits into from Jun 29, 2023

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Jun 26, 2023

Relates to #2528

Changes proposed in this pull request:

  • fix remaining f strings
  • use flake8-use-fstrings to throw errors in case of usage of % or .format()

@github-actions
Copy link
Contributor

github-actions bot commented Jun 26, 2023

👋 @Remi-Gau Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

  • PR has an interpretable title.
  • PR links to Github issue with mention Closes #XXXX (see our documentation on PR structure)
  • Code is PEP8-compliant (see our documentation on coding style)
  • Changelog or what's new entry in doc/changes/latest.rst (see our documentation on PR structure)

For new features:

  • There is at least one unit test per new function / class (see our documentation on testing)
  • The new feature is demoed in at least one relevant example.

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

We will review it as quick as possible, feel free to ping us with questions if needed.

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #3776 (ad2022f) into main (7d91e88) will increase coverage by 0.00%.
The diff coverage is 80.00%.

@@           Coverage Diff           @@
##             main    #3776   +/-   ##
=======================================
  Coverage   91.52%   91.52%           
=======================================
  Files         133      133           
  Lines       15557    15561    +4     
  Branches     3229     3229           
=======================================
+ Hits        14238    14242    +4     
  Misses        772      772           
  Partials      547      547           
Flag Coverage Δ
macos-latest_3.10 91.44% <80.00%> (?)
macos-latest_3.11 91.44% <80.00%> (+<0.01%) ⬆️
macos-latest_3.8 91.41% <80.00%> (?)
macos-latest_3.9 91.41% <80.00%> (?)
ubuntu-latest_3.10 91.44% <80.00%> (?)
ubuntu-latest_3.11 91.44% <80.00%> (?)
ubuntu-latest_3.8 91.41% <80.00%> (?)
ubuntu-latest_3.9 91.41% <80.00%> (+<0.01%) ⬆️
windows-latest_3.10 91.38% <80.00%> (+<0.01%) ⬆️
windows-latest_3.11 91.38% <80.00%> (?)
windows-latest_3.8 91.35% <80.00%> (?)
windows-latest_3.9 91.35% <80.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nilearn/_utils/cache_mixin.py 80.64% <ø> (ø)
nilearn/datasets/utils.py 75.86% <ø> (ø)
..._testing/_glm_reporter_visual_inspection_suite_.py 88.23% <ø> (ø)
nilearn/_utils/niimg_conversions.py 90.47% <33.33%> (ø)
nilearn/datasets/atlas.py 93.14% <66.66%> (ø)
nilearn/_utils/exceptions.py 100.00% <100.00%> (ø)
nilearn/_utils/logger.py 100.00% <100.00%> (ø)
nilearn/_utils/niimg.py 97.11% <100.00%> (+0.05%) ⬆️
nilearn/_utils/testing.py 66.66% <100.00%> (ø)
nilearn/datasets/func.py 78.52% <100.00%> (ø)
... and 1 more

... and 7 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Remi-Gau
Copy link
Collaborator Author

there are a few string concatenation left here and there in the code base but changing them was actually making it harder to read and they are not flagged as error by flake8-use-fstrings

@Remi-Gau Remi-Gau marked this pull request as ready for review June 26, 2023 06:55
pyproject.toml Outdated Show resolved Hide resolved
@ymzayek
Copy link
Member

ymzayek commented Jun 27, 2023

This LGTM! I'm unsure about these azure failures now popping up everywhere. I can try to get an opinion from Azure developers. Let's also see if everything passes on the github tests in #3780

…rn#3780)

* try testing install with gh

* try testing on windows

* cancel previous test install workflows

* rm azure pipeline tests

* rm azure badge

* update doc
@ymzayek
Copy link
Member

ymzayek commented Jun 28, 2023

Something went wrong with the merge here? See diff

@Remi-Gau
Copy link
Collaborator Author

Something went wrong with the merge here? See diff

oops
indeed

@Remi-Gau
Copy link
Collaborator Author

should look better now

Co-authored-by: bthirion <bertrand.thirion@inria.fr>
Copy link
Member

@ymzayek ymzayek left a comment

Choose a reason for hiding this comment

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

LGTM thx!

@Remi-Gau Remi-Gau merged commit ee21258 into nilearn:main Jun 29, 2023
27 of 28 checks passed
@Remi-Gau Remi-Gau deleted the more_f_strings branch June 29, 2023 12:54
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.

None yet

3 participants