Skip to content

Commit

Permalink
add git blame ignore revs, ruff resort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
indy-independence committed Dec 5, 2024
1 parent b4f3e2c commit 6d8e095
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# mypy fixes and reformatting
b4f3e2c0a3bf9fc2965338c16454b22a1dc6f805
# black, isort and flake8 work 2023
8a535e6d98bfb6b00da1c79700fb18a204d63ad4
# rename confpush to devicehandler
Expand Down
2 changes: 1 addition & 1 deletion src/cnaas_nms/api/system.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from os.path import abspath, dirname

from flask_restx import Namespace, Resource
from git import InvalidGitRepositoryError, NoSuchPathError, Repo

import cnaas_nms.version
from cnaas_nms.api import app
from cnaas_nms.api.generic import empty_result
from cnaas_nms.scheduler.scheduler import Scheduler
from cnaas_nms.tools.security import login_required
from cnaas_nms.version import __api_version__
from git import InvalidGitRepositoryError, NoSuchPathError, Repo

api = Namespace(
"system", description="API for managing the CNaaS NMS API system", prefix="/api/{}".format(__api_version__)
Expand Down
6 changes: 3 additions & 3 deletions src/cnaas_nms/db/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
from typing import Dict, List, Optional, Set, Tuple
from urllib.parse import urldefrag

import git.remote
import yaml
from git import InvalidGitRepositoryError, Repo
from git.exc import GitCommandError, NoSuchPathError

import git.remote
from cnaas_nms.app_settings import app_settings
from cnaas_nms.db.device import Device, DeviceType
from cnaas_nms.db.exceptions import ConfigException, RepoStructureException
Expand All @@ -31,8 +33,6 @@
from cnaas_nms.tools.event import add_event
from cnaas_nms.tools.githelpers import parse_git_changed_files
from cnaas_nms.tools.log import get_logger
from git import InvalidGitRepositoryError, Repo
from git.exc import GitCommandError, NoSuchPathError


class RepoType(enum.Enum):
Expand Down
3 changes: 2 additions & 1 deletion src/cnaas_nms/db/git_worktrees.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
from typing import Optional, Set

import git.exc
from git import Repo

from cnaas_nms.app_settings import app_settings
from cnaas_nms.db.device import Device
from cnaas_nms.db.groups import get_groups_using_branch
from cnaas_nms.db.session import sqla_session
from cnaas_nms.devicehandler.sync_history import add_sync_event
from cnaas_nms.tools.githelpers import parse_git_changed_files
from cnaas_nms.tools.log import get_logger
from git import Repo


class WorktreeError(Exception):
Expand Down
2 changes: 1 addition & 1 deletion src/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from contextlib import closing

import pytest
from git import Repo

from cnaas_nms.scheduler.scheduler import Scheduler
from git import Repo


def pytest_configure(config):
Expand Down

0 comments on commit 6d8e095

Please sign in to comment.