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

ci: enable pyupgrade rules in ruff #921

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

epenet
Copy link
Contributor

@epenet epenet commented Nov 12, 2024

Description

SSIA, see https://docs.astral.sh/ruff/rules/#pyupgrade-up

Related Issues

Checklist

  • This PR has sufficient documentation.
  • This PR has sufficient test coverage.
  • This PR title satisfies semantic convention.

Additional Comments

Needs:

Comment on lines +362 to +364
yield (
warning_style(gettext(base_message))
+ f" {unused_snapshots} ({path_to_file})"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -139,7 +139,7 @@ def __read_file_with_markers(
missing_version = True

try:
with open(filepath, "r", encoding=TEXT_ENCODING, newline=None) as f:
with open(filepath, encoding=TEXT_ENCODING, newline=None) as f:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -53,7 +53,7 @@ def _read_snapshot_collection(self, snapshot_location: str) -> "SnapshotCollecti
return self.serializer_class.read_file(snapshot_location)

@classmethod
@lru_cache()
@lru_cache
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #921   +/-   ##
=======================================
  Coverage   97.74%   97.74%           
=======================================
  Files          21       21           
  Lines        1596     1596           
=======================================
  Hits         1560     1560           
  Misses         36       36           

🚨 Try these New Features:

@epenet epenet marked this pull request as ready for review November 13, 2024 22:28
@epenet
Copy link
Contributor Author

epenet commented Nov 13, 2024

Note: I think #896 can be closed when this is accepted/merged

@noahnu noahnu merged commit 8c1208d into syrupy-project:main Nov 18, 2024
15 of 17 checks passed
@noahnu noahnu mentioned this pull request Nov 18, 2024
3 tasks
@epenet epenet deleted the 20241112-0834 branch November 18, 2024 05:41
@noahnu
Copy link
Collaborator

noahnu commented Nov 23, 2024

🎉 This PR is included in version 4.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants