Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade pre-commit image version #68

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
repos:
- repo: git://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.9
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.0
hooks:
- id: remove-tabs

- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
Expand All @@ -22,39 +22,40 @@ repos:
- id: check-ast
- id: debug-statements

- repo: git://github.com/pycqa/pydocstyle.git
rev: 6.0.0
- repo: https://github.com/pycqa/pydocstyle.git
rev: 6.1.1
hooks:
- id: pydocstyle

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.3.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v0.971
hooks:
- id: mypy
exclude: '^(docs|tasks|tests)|setup\.py'
args: [--ignore-missing-imports]
additional_dependencies:
- types-all

- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.6.0
hooks:
- id: black

# Enable this in repositories with python packages.
- repo: https://github.com/mgedmin/check-manifest
rev: '0.46'
rev: '0.48'
hooks:
- id: check-manifest

- repo: https://gitlab.com/PyCQA/flake8
rev: '3.9.0'
rev: '3.9.2'
hooks:
- id: flake8
additional_dependencies: ['pep8-naming']
Expand Down
2 changes: 1 addition & 1 deletion .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ presubmits:
context: aicoe-ci/prow/pre-commit
spec:
containers:
- image: quay.io/thoth-station/thoth-precommit-py38:v0.12.5
- image: quay.io/thoth-station/thoth-precommit-py38:v0.14.3
command:
- "pre-commit"
- "run"
Expand Down
14 changes: 7 additions & 7 deletions thoth/sourcemanagement/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
from delegator import Command


class SourceManagementException(Exception):
class SourceManagementExceptionError(Exception):
"""A base class for Kebechet exception hierarchy."""


class ConfigurationError(SourceManagementException):
class ConfigurationError(SourceManagementExceptionError):
"""Raised on error in configuration file."""


class PipenvError(SourceManagementException):
class PipenvError(SourceManagementExceptionError):
"""Raised on missing/invalid Pipenv or Pipenv.lock file."""

def __init__(self, command: Command, *args, **kwargs):
Expand All @@ -40,25 +40,25 @@ def __init__(self, command: Command, *args, **kwargs):
super().__init__(*args)


class PullRequestError(SourceManagementException):
class PullRequestError(SourceManagementExceptionError):
"""Raised in case of failed pull request."""


class CannotFetchPRError(SourceManagementException):
class CannotFetchPRError(SourceManagementExceptionError):
"""An exception raised if there OGR cannot fetch the PR's for a repo.

Generally the token is invalid or doesn't have access to the repo.
"""


class CannotFetchBranchesError(SourceManagementException):
class CannotFetchBranchesError(SourceManagementExceptionError):
"""An exception raised if there OGR cannot fetch the repo branches.

Generally the token is invalid or doesn't have access to the repo.
"""


class CreatePRError(SourceManagementException):
class CreatePRError(SourceManagementExceptionError):
"""An exception raised if there OGR cannot create an PR.

Generally the token is invalid or doesn't have access to the repo.
Expand Down