Skip to content
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
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/py-template",
"commit": "fdce0adb4bb61a3580ea0430a24ad3ec85749a8b",
"commit": "9d27491d231f3c4eaba286d81dc838f8bbc73d37",
"context": {
"cookiecutter": {
"project_name": "scmrepo",
Expand Down
11 changes: 7 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ repos:
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
args: ['--assume-in-merge']
exclude: "README.rst"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

merge conflict check will give false positive on rst files with 7-character ======= headings, there is no workaround other than excluding the entire file

pre-commit/pre-commit-hooks#100

- id: check-toml
- id: check-yaml
- id: debug-statements
Expand All @@ -28,9 +30,10 @@ repos:
- id: codespell
additional_dependencies: ["tomli"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.0.0
rev: v3.2.2
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
Expand All @@ -40,9 +43,9 @@ repos:
hooks:
- id: flake8
additional_dependencies:
- flake8-broken-line==0.5.0
- flake8-bugbear==22.8.23
- flake8-comprehensions==3.10.0
- flake8-broken-line==0.6.0
- flake8-bugbear==22.10.27
- flake8-comprehensions==3.10.1
- flake8-debugger==4.1.2
- flake8-string-format==0.3.0
- repo: https://github.com/pycqa/bandit
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install_requires=

[options.extras_require]
tests =
pytest==7.1.2
pytest==7.2.0
pytest-sugar==0.9.5
pytest-cov==3.0.0
pytest-mock==3.8.2
Expand Down
4 changes: 2 additions & 2 deletions src/scmrepo/git/backend/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BaseGitBackend(ABC):
def __init__(self, root_dir=os.curdir, search_parent_directories=True):
pass

def close(self):
def close(self): # noqa: B027
pass

@abstractmethod
Expand Down Expand Up @@ -356,7 +356,7 @@ def status(
files can take some time.
"""

def _reset(self) -> None:
def _reset(self) -> None: # noqa: B027
pass

@abstractmethod
Expand Down
5 changes: 2 additions & 3 deletions src/scmrepo/git/backend/dulwich/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _prepare_command(self) -> Union[str, List[str]]:
# a C git helper in GIT_EXEC_PATH
git_exec_path = subprocess.check_output( # nosec B603
("git", "--exec-path"),
universal_newlines=True,
text=True,
).strip()
if shutil.which(executable, path=git_exec_path):
executable = os.path.join(git_exec_path, executable)
Expand Down Expand Up @@ -184,8 +184,7 @@ def get(
res = subprocess.run( # type: ignore # nosec B603 # breaks on 3.6
cmd,
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
capture_output=True,
input=os.linesep.join(helper_input).encode("ascii"),
**self._run_kwargs,
)
Expand Down