Skip to content

Some small improvements prompted by PyLint errors#62

Merged
pda merged 1 commit intomainfrom
pylint-fixes
Jul 18, 2025
Merged

Some small improvements prompted by PyLint errors#62
pda merged 1 commit intomainfrom
pylint-fixes

Conversation

@pda
Copy link
Member

@pda pda commented Jul 18, 2025

PyLint was failing in CI on main after my recent changes:

************* Module buildkite_test_collector.collector.run_env
src/buildkite_test_collector/collector/run_env.py:11:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module buildkite_test_collector.collector.api
src/buildkite_test_collector/collector/api.py:21:0: C0301: Line too long (105/100) (line-too-long)
src/buildkite_test_collector/collector/api.py:11:0: R0903: Too few public methods (1/2) (too-few-public-methods)

I've avoided the long line by pulling out some env var name constants, which is nice anyway.

And I've disabled the very silly too-few-public-methods warning on the API and RunEnvBuilder classes. A constructor and one public method should be enough for anyone!

@pda pda requested review from a team and Copilot July 18, 2025 02:07
Copy link

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 addresses PyLint CI failures by fixing line length violations and disabling too-few-public-methods warnings on specific classes. The changes improve code maintainability by extracting environment variable names into constants and refactoring the API class to store configuration during initialization.

  • Extracted environment variable names and default API URL into class constants
  • Refactored API class to store token and API URL as instance variables during initialization
  • Added pylint disable comments for too-few-public-methods and too-many-instance-attributes warnings

Reviewed Changes

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

File Description
src/buildkite_test_collector/collector/run_env.py Added pylint disable comments for code quality warnings
src/buildkite_test_collector/collector/api.py Extracted constants and refactored API class initialization to store configuration

@pda pda merged commit 5716341 into main Jul 18, 2025
11 checks passed
@pda pda deleted the pylint-fixes branch July 18, 2025 02:13
@pda pda mentioned this pull request Jul 21, 2025
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