Skip to content

Conversation

@dimaqq
Copy link
Contributor

@dimaqq dimaqq commented Nov 12, 2024

What this PR does

In short, we'll be relying on ruff via pre-commit as opposed to flake8 via tox.

  • switches from flake8 to ruff
  • reformats the source code
  • reformats the docstrings where safe, conservatively
  • resolves ruff complaints where that's straightforward
  • silences with a FIXME where public API could break or code change is not obvious or where too much manual work is required, those can be fixed in separate PRs
  • updates the CI and docs for the above

Check list

  • pre-commit config
  • ruff over the codebase
  • resolve or silence errors
  • kill old linter and github actions
  • GitHub actions to check pre-commit
  • run pre-commit after codegen
  • add to docs

@dimaqq dimaqq marked this pull request as ready for review November 13, 2024 08:50
@dimaqq
Copy link
Contributor Author

dimaqq commented Nov 14, 2024

I've reviewed the full diff on github.

Copy link
Contributor

@james-garner-canonical james-garner-canonical left a comment

Choose a reason for hiding this comment

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

Went through this with Dima in a video call, and I think we're good to land this now

@dimaqq
Copy link
Contributor Author

dimaqq commented Nov 18, 2024

/merge

@jujubot jujubot merged commit 706d174 into juju:main Nov 18, 2024
@dimaqq dimaqq deleted the chore-ruff branch January 6, 2025 06:47
jujubot added a commit that referenced this pull request May 23, 2025
…ng-to-existing-model

#1265

#### Description

#1044 fixed proxy object reuse some time ago
I accidentally undid that change in #1186 as I didn't realise that multiple connect/close calls were expected on a given instance.
This PR re-applies the change, and cleans up init.

(I've rearranged the initialisation order, because `__del__()` is run on a partially-initialised instance if `__init__()` fails half-way through. That's something that happens in unit tests, although unlikely to affect legitimate use.)

Fixes: #1264 creating offer fails when connecting to existing model

#### QA Steps

- No regression in unit or integration tests
- Eyeball the code change

All CI tests need to pass.

Fixes #1264
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