8000 Ruff by mfocko · Pull Request #806 · packit/ogr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ruff #806

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 communi 8000 ty.

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

Merged
merged 16 commits into from
Oct 12, 2023
Merged

Ruff #806

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
15 changes: 6 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# pre-commit install -t pre-commit -t pre-push

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
Expand All @@ -29,11 +25,6 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: [--max-line-length=100]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
Expand Down Expand Up @@ -63,3 +54,9 @@ repos:
- id: requre-purge
# Do not run in pre-commit.ci as it requires too much time
stages: [manual, push]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.291
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
10 changes: 4 additions & 6 deletions ogr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,22 @@
Module providing one api for multiple git services (github/gitlab/pagure)
"""

import contextlib
from importlib.metadata import PackageNotFoundError, distribution

from ogr.abstract import AuthMethod
from ogr.factory import (
get_instances_from_dict,
get_project,
get_service_class,
get_service_class_or_none,
get_instances_from_dict,
)
from ogr.services.github import GithubService
from ogr.services.gitlab import GitlabService
from ogr.services.pagure import PagureService
from ogr.abstract import AuthMethod

try:
with contextlib.suppress(PackageNotFoundError):
__version__ = distribution(__name__).version
except PackageNotFoundError:
# package is not installed
pass

__all__ = [
GithubService.__name__,
Expand Down
Loading
0