Skip to content

Commit a7c5d88

Browse files
committed
Remove flake8 linting in favor of black formatting
`flake8` seems to dislike the formatting of black.
1 parent 21ec529 commit a7c5d88

File tree

12 files changed

+6
-59
lines changed

12 files changed

+6
-59
lines changed

���.flake8

-35
This file was deleted.

‎.github/workflows/pythonpackage.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ jobs:
4444
# and cause subsequent tests to fail
4545
cat test/fixtures/.gitconfig >> ~/.gitconfig
4646
47-
- name: Lint with flake8
47+
- name: Lint with Black
4848
run: |
4949
set -x
50-
flake8
50+
black --check .
5151
5252
- name: Check types with mypy
5353
# With new versions of pypi new issues might arise. This is a problem if there is nobody able to fix them,

‎README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,14 @@ with MINGW's.
107107
Ensure testing libraries are installed.
108108
In the root directory, run: `pip install -r test-requirements.txt`
109109

110-
To lint, run: `flake8`
111-
112110
To typecheck, run: `mypy -p git`
113111

114112
To test, run: `pytest`
115113

116-
Configuration for flake8 is in the ./.flake8 file.
117-
118114
Configurations for mypy, pytest and coverage.py are in ./pyproject.toml.
119115

116+
Run `black` for formatting.
117+
120118
The same linting and testing will also be performed against different supported python versions
121119
upon submitting a pull request (or on each push if you have a fork with a "main" branch and actions enabled).
122120

‎git/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6-
# flake8: noqa
76
# @PydevCodeAnalysisIgnore
87
from git.exc import * # @NoMove @IgnorePep8
98
import inspect

‎git/cmd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ def execute(
947947
)
948948
else:
949949
cmd_not_found_exception = (
950-
FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable
950+
FileNotFoundError
951951
)
952952
# end handle
953953

‎git/compat.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# This module is part of GitPython and is released under
66
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
77
"""utilities to help provide compatibility with python 3"""
8-
# flake8: noqa
98

109
import locale
1110
import os

‎git/index/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
"""Initialize the index package"""
2-
# flake8: noqa
32
from .base import *
43
from .typ import *

‎git/objects/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""
22
Import all submodules main classes into the package space
33
"""
4-
# flake8: noqa
54
import inspect
65

76
from .base import *

‎git/refs/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# flake8: noqa
21
# import all modules in order, fix the names they require
32
from .symbolic import *
43
from .reference import *

‎git/repo/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
"""Initialize the Repo package"""
2-
# flake8: noqa
32
from .base import Repo as Repo

‎requirements-dev.txt

-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33

44
# libraries for additional local testing/linting - to be added to test-requirements.txt when all pass
55

6-
flake8-type-checking;python_version>="3.8" # checks for TYPE_CHECKING only imports
7-
# flake8-annotations # checks for presence of type annotations
8-
# flake8-rst-docstrings # checks docstrings are valid RST
9-
# flake8-builtins # warns about shadowing builtin names
10-
# flake8-pytest-style
11-
12-
# pytest-flake8
136
pytest-icdiff
147
# pytest-profiling
158

‎test-requirements.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
ddt>=1.1.1, !=1.4.3
22
mypy
33

4-
flake8
5-
flake8-bugbear
6-
flake8-comprehensions
7-
flake8-typing-imports
4+
black
85

96
virtualenv
107

0 commit comments

Comments
 (0)