Skip to content

Conversation

jamesbraza
Copy link
Collaborator

I realized #1113 had left behind an extra enumerate we could have detected with refurb

@jamesbraza jamesbraza self-assigned this Oct 3, 2025
@jamesbraza jamesbraza added the enhancement New feature or request label Oct 3, 2025
@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 17:33
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 3, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR re-adds the refurb linter to the CI workflow and applies several code improvements detected by refurb to enhance code quality and performance. The changes focus on simplifying code patterns and following Python best practices.

  • Re-enables refurb linting in CI to catch code quality issues
  • Simplifies list comprehensions and boolean checks
  • Updates file handling to use modern Path methods

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/tests.yml Adds refurb linting step to CI workflow
src/paperqa/utils.py Adds noqa comment to suppress refurb warning
src/paperqa/clients/journal_quality.py Updates file opening to use Path.open() method
src/paperqa/agents/tools.py Simplifies list comprehension by removing unnecessary enumerate
tests/test_paperqa.py Simplifies boolean assertion for bytes data
packages/paper-qa-pypdf/tests/test_paperqa_pypdf.py Changes list to tuple and simplifies assertion
packages/paper-qa-pymupdf/tests/test_paperqa_pymupdf.py Changes list to tuple and simplifies assertion

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dosubot dosubot bot added the bug Something isn't working label Oct 3, 2025
Copy link

dosubot bot commented Oct 3, 2025

Related Documentation

Checked 1 published document(s). No updates required.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. lgtm This PR has been approved by a maintainer and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 3, 2025
@jamesbraza jamesbraza merged commit 7d3c3ae into main Oct 3, 2025
5 checks passed
@jamesbraza jamesbraza deleted the readding-refurb branch October 3, 2025 18:22
Copy link

dosubot bot commented Oct 3, 2025

Documentation Updates

Checked 1 published document(s). No updates required.

How did I do? Any feedback?  Join Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants