summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.flake835
-rw-r--r--.github/workflows/pythonpackage.yml4
-rw-r--r--README.md6
-rw-r--r--git/__init__.py1
-rw-r--r--git/cmd.py2
-rw-r--r--git/compat.py1
-rw-r--r--git/index/__init__.py1
-rw-r--r--git/objects/__init__.py1
-rw-r--r--git/refs/__init__.py1
-rw-r--r--git/repo/__init__.py1
-rw-r--r--requirements-dev.txt7
-rw-r--r--test-requirements.txt5
12 files changed, 6 insertions, 59 deletions
diff --git a/.flake8 b/.flake8
deleted file mode 100644
index c55fe35d..00000000
--- a/.flake8
+++ /dev/null
@@ -1,35 +0,0 @@
-[flake8]
-show-source = True
-count= True
-statistics = True
-# E265 = comment blocks like @{ section, which it can't handle
-# E266 = too many leading '#' for block comment
-# E731 = do not assign a lambda expression, use a def
-# W293 = Blank line contains whitespace
-# W504 = Line break after operator
-# E704 = multiple statements in one line - used for @override
-# TC002 = move third party import to TYPE_CHECKING
-# ANN = flake8-annotations
-# TC, TC2 = flake8-type-checking
-# D = flake8-docstrings
-
-# select = C,E,F,W ANN, TC, TC2 # to enable code. Disabled if not listed, including builtin codes
-enable-extensions = TC, TC2 # only needed for extensions not enabled by default
-
-ignore = E265,E266,E731,E704,
- W293, W504,
- ANN0 ANN1 ANN2,
- TC002,
- TC0, TC1, TC2
- # B,
- A,
- D,
- RST, RST3
-max-line-length = 120
-
-exclude = .tox,.venv,build,dist,doc,git/ext/,test
-
-rst-roles = # for flake8-RST-docstrings
- attr,class,func,meth,mod,obj,ref,term,var # used by sphinx
-
-min-python-version = 3.7.0
diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index 881f2ec5..bcb47008 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -44,10 +44,10 @@ jobs:
# and cause subsequent tests to fail
cat test/fixtures/.gitconfig >> ~/.gitconfig
- - name: Lint with flake8
+ - name: Lint with Black
run: |
set -x
- flake8
+ black --check .
- name: Check types with mypy
# With new versions of pypi new issues might arise. This is a problem if there is nobody able to fix them,
diff --git a/README.md b/README.md
index 54a735e5..0709b796 100644
--- a/README.md
+++ b/README.md
@@ -107,16 +107,14 @@ with MINGW's.
Ensure testing libraries are installed.
In the root directory, run: `pip install -r test-requirements.txt`
-To lint, run: `flake8`
-
To typecheck, run: `mypy -p git`
To test, run: `pytest`
-Configuration for flake8 is in the ./.flake8 file.
-
Configurations for mypy, pytest and coverage.py are in ./pyproject.toml.
+Run `black` for formatting.
+
The same linting and testing will also be performed against different supported python versions
upon submitting a pull request (or on each push if you have a fork with a "main" branch and actions enabled).
diff --git a/git/__init__.py b/git/__init__.py
index 3f26886f..209a4d90 100644
--- a/git/__init__.py
+++ b/git/__init__.py
@@ -3,7 +3,6 @@
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
-# flake8: noqa
# @PydevCodeAnalysisIgnore
from git.exc import * # @NoMove @IgnorePep8
import inspect
diff --git a/git/cmd.py b/git/cmd.py
index 12409b0c..c9e23ede 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -947,7 +947,7 @@ class Git(LazyMixin):
)
else:
cmd_not_found_exception = (
- FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable
+ FileNotFoundError
)
# end handle
diff --git a/git/compat.py b/git/compat.py
index e7ef28c3..20e6b979 100644
--- a/git/compat.py
+++ b/git/compat.py
@@ -5,7 +5,6 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
"""utilities to help provide compatibility with python 3"""
-# flake8: noqa
import locale
import os
diff --git a/git/index/__init__.py b/git/index/__init__.py
index 96b721f0..e50e4f53 100644
--- a/git/index/__init__.py
+++ b/git/index/__init__.py
@@ -1,4 +1,3 @@
"""Initialize the index package"""
-# flake8: noqa
from .base import *
from .typ import *
diff --git a/git/objects/__init__.py b/git/objects/__init__.py
index d2e1e53a..01a6395b 100644
--- a/git/objects/__init__.py
+++ b/git/objects/__init__.py
@@ -1,7 +1,6 @@
"""
Import all submodules main classes into the package space
"""
-# flake8: noqa
import inspect
from .base import *
diff --git a/git/refs/__init__.py b/git/refs/__init__.py
index 1486dffe..c17856ae 100644
--- a/git/refs/__init__.py
+++ b/git/refs/__init__.py
@@ -1,4 +1,3 @@
-# flake8: noqa
# import all modules in order, fix the names they require
from .symbolic import *
from .reference import *
diff --git a/git/repo/__init__.py b/git/repo/__init__.py
index 23c18db8..0ca758cb 100644
--- a/git/repo/__init__.py
+++ b/git/repo/__init__.py
@@ -1,3 +1,2 @@
"""Initialize the Repo package"""
-# flake8: noqa
from .base import Repo as Repo
diff --git a/requirements-dev.txt b/requirements-dev.txt
index f3aad629..96b65551 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -3,13 +3,6 @@
# libraries for additional local testing/linting - to be added to test-requirements.txt when all pass
-flake8-type-checking;python_version>="3.8" # checks for TYPE_CHECKING only imports
-# flake8-annotations # checks for presence of type annotations
-# flake8-rst-docstrings # checks docstrings are valid RST
-# flake8-builtins # warns about shadowing builtin names
-# flake8-pytest-style
-
-# pytest-flake8
pytest-icdiff
# pytest-profiling
diff --git a/test-requirements.txt b/test-requirements.txt
index 53d8e606..c48a5856 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,10 +1,7 @@
ddt>=1.1.1, !=1.4.3
mypy
-flake8
-flake8-bugbear
-flake8-comprehensions
-flake8-typing-imports
+black
virtualenv