Skip to content

Commit

Permalink
Enable ruff rules part 4. (#5590)
Browse files Browse the repository at this point in the history
# Description
<!-- What does this pull request (PR) do? Why is it necessary? -->
<!-- Tell us about your new feature, improvement, or fix! -->
<!-- If your change includes user interface changes, please add an
image, or an animation "An image is worth a thousand words!" -->
<!-- You can use https://www.cockos.com/licecap/ or similar to create
animations -->

* `INP` flake8-no-pep420 - The pep 420 is something that part of us may
remember as the reason why napari stop working at some moment because of
some problematic files in `site-packages`.

 * `PYI` flake8-pyi - better type annotation
* `Q`, flake8-quotes - enforce quoting, but the rule Q000 is disabled
(see #5589).
* `RSE` # flake8-raise - simplify raise code by remove `()` when
obsolete.
* `RET` # flake8-return - simplify code readability by forcing proper
return schema.
 * `TID` # flake8-tidy-imports - replacement for absolutify imports
* `TRY` # tryceratops - enforce rules on exception raises like keeping
in try only this that could raise exception (see why it could create
problems in #5577).
* `ICN` # flake8-import-conventions - enforce import convention for
alias (like `import numpy as np`)
 * `RUF`# ruff specific rules -

## Type of change
<!-- Please delete options that are not relevant. -->
- [x] Maintenance

# References
<!-- What resources, documentation, and guides were used in the creation
of this PR? -->
<!-- If this is a bug-fix or otherwise resolves an issue, reference it
here with "closes #(issue)" -->

# How has this been tested?
<!-- Please describe the tests that you ran to verify your changes. -->
- [ ] example: the test suite for my feature covers cases x, y, and z
- [ ] example: all tests pass with my change
- [ ] example: I check if my changes works with both PySide and PyQt
backends
      as there are small differences between the two Qt bindings.

## Final checklist:
- [ ] My PR is the minimum possible work for the desired functionality
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] If I included new strings, I have used `trans.` to make them
localizable.
For more information see our [translations
guide](https://napari.org/developers/translations.html).
  • Loading branch information
Czaki authored and jaimergp committed Apr 25, 2023
1 parent 70e4bc1 commit 11af400
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions napari_plugin_manager/qt_package_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ def ident(self):
@classmethod
def executable(cls):
"Path to the executable that will run the task"
raise NotImplementedError()
raise NotImplementedError

# abstract method
def arguments(self):
"Arguments supplied to the executable"
raise NotImplementedError()
raise NotImplementedError

# abstract method
def environment(
self, env: QProcessEnvironment = None
) -> QProcessEnvironment:
"Changes needed in the environment variables."
raise NotImplementedError()
raise NotImplementedError

@staticmethod
def constraints() -> Sequence[str]:
Expand All @@ -93,7 +93,7 @@ def available(cls) -> bool:
"""
Check if the tool is available by performing a little test
"""
raise NotImplementedError()
raise NotImplementedError


class PipInstallerTool(AbstractInstallerTool):
Expand Down

0 comments on commit 11af400

Please sign in to comment.