Skip to content

Conversation

@pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Dec 29, 2025

Related Issue(s):

Description:

Use self as name for the first parameter for instance methods, and align type annotations to match the superclass type annotation for mutable variables.

PR Checklist:

  • Pre-commit hooks pass (run pre-commit run --all-files)
  • Tests pass (run pytest)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage
  • This PR's title is formatted per conventional commits

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.22%. Comparing base (61c3e14) to head (56ce944).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1614   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files          55       55           
  Lines        8411     8414    +3     
  Branches      973      973           
=======================================
+ Hits         7757     7760    +3     
  Misses        466      466           
  Partials      188      188           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

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

As mentioned below, the type changes are good, but I think changing the positional arg names seems unnecessary since it's breaking.

The constructor is an instance method,
not a class method, so call the first
parameter "self".
The variable is mutable so the type
is invariant, use the Iterable type
that it is declared as in the superclass.
@pjonsson pjonsson mentioned this pull request Dec 29, 2025
5 tasks
@pjonsson pjonsson requested a review from jsignell December 29, 2025 23:57
@jsignell jsignell changed the title fix: fix some type issues fix: type issues Jan 2, 2026
@jsignell jsignell changed the title fix: type issues fix: use broader iterable type Jan 2, 2026
Copy link
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

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

LGTM

@jsignell jsignell added this pull request to the merge queue Jan 2, 2026
Merged via the queue into stac-utils:main with commit b9422d8 Jan 2, 2026
22 checks passed
@pjonsson pjonsson deleted the type-fixes branch January 3, 2026 21:04
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