Skip to content

Replace os with Path#624

Merged
evgeny-stakewise merged 1 commit intomasterfrom
refactor-path
Dec 18, 2025
Merged

Replace os with Path#624
evgeny-stakewise merged 1 commit intomasterfrom
refactor-path

Conversation

@evgeny-stakewise
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 17, 2025 18:22
Copy link
Copy Markdown
Contributor

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 modernizes the codebase by replacing os and os.path functions with their pathlib.Path equivalents, improving code consistency and readability. The changes follow Python's modern best practices for file system operations.

Key Changes:

  • Replaced os.path.isfile() with Path.is_file()
  • Replaced os.path.dirname() and os.path.join() with Path operators
  • Replaced os.remove() with Path.unlink() and glob.glob() with Path.glob()

Reviewed changes

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

Show a summary per file
File Description
src/validators/keystores/local.py Replaced os.path.isfile() calls with Path.is_file() method and removed unused import
src/common/wallet.py Converted os.path.isfile() checks to use Path.is_file() method
src/common/contracts.py Replaced os.path.dirname() and os.path.join() with Path operations
src/commands/tests/test_create_keys.py Replaced glob.glob() with Path.glob() method
src/commands/setup_remote_signer.py Replaced os.remove() with Path.unlink() method
src/commands/create_keys.py Changed glob('*') to iterdir() and simplified path joining

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@evgeny-stakewise evgeny-stakewise merged commit 9c5a681 into master Dec 18, 2025
8 checks passed
@evgeny-stakewise evgeny-stakewise deleted the refactor-path branch December 18, 2025 08:59
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.

3 participants